|
From: <gem...@li...> - 2012-03-01 16:05:40
|
Revision: 531
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=531&view=rev
Author: matijsdejong
Date: 2012-03-01 16:05:31 +0000 (Thu, 01 Mar 2012)
Log Message:
-----------
Second round in simplifying ModelSnippetActionAbstract
Modified Paths:
--------------
trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
Added Paths:
-----------
trunk/library/snippets/Generic/CurrentButtonRowSnippet.php
Removed Paths:
-------------
trunk/library/snippets/Generic/CurrentButtonRow.php
Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
===================================================================
--- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-03-01 15:35:00 UTC (rev 530)
+++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-03-01 16:05:31 UTC (rev 531)
@@ -104,7 +104,7 @@
*
* @var mixed String or array of snippets name
*/
- protected $indexStopSnippets = 'Generic_CurrentButtonRow';
+ protected $indexStopSnippets = 'Generic_CurrentButtonRowSnippet';
/**
* The snippets used for the show action
Deleted: trunk/library/snippets/Generic/CurrentButtonRow.php
===================================================================
--- trunk/library/snippets/Generic/CurrentButtonRow.php 2012-03-01 15:35:00 UTC (rev 530)
+++ trunk/library/snippets/Generic/CurrentButtonRow.php 2012-03-01 16:05:31 UTC (rev 531)
@@ -1,85 +0,0 @@
-<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Short description of file
- *
- * @package Gems
- * @subpackage Snippets\Generic
- * @author Matijs de Jong <mj...@ma...>
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $
- */
-
-/**
- * Short description for class
- *
- * Long description for class (if any)...
- *
- * @package Gems
- * @subpackage Snippets\Generic
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @since Class available since version 1.4.2
- */
-class Generic_CurrentButtonRow extends MUtil_Snippets_SnippetAbstract
-{
- /**
- * Required
- *
- * @var Gems_Menu
- */
- protected $menu;
-
- /**
- * Required
- *
- * @var Zend_Controller_Request_Abstract
- */
- protected $request;
-
- /**
- * Create the snippets content
- *
- * This is a stub function either override getHtmlOutput() or override render()
- *
- * @param Zend_View_Abstract $view Just in case it is needed here
- * @return MUtil_Html_HtmlInterface Something that can be rendered
- */
- public function getHtmlOutput(Zend_View_Abstract $view)
- {
- $menuList = $this->menu->getMenuList();
-
- $menuList->addParameterSources($this->request)
- ->addCurrentParent($this->_('Cancel'))
- ->addCurrentChildren();
-
- return $menuList;
- }
-
-}
Added: trunk/library/snippets/Generic/CurrentButtonRowSnippet.php
===================================================================
--- trunk/library/snippets/Generic/CurrentButtonRowSnippet.php (rev 0)
+++ trunk/library/snippets/Generic/CurrentButtonRowSnippet.php 2012-03-01 16:05:31 UTC (rev 531)
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package Gems
+ * @subpackage Snippets\Generic
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $
+ */
+
+/**
+ * Displays the parent menu item (if existing) plus any current
+ * level buttons that are visible
+ *
+ * @package Gems
+ * @subpackage Snippets\Generic
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4.2
+ */
+class Generic_CurrentButtonRowSnippet extends MUtil_Snippets_SnippetAbstract
+{
+ /**
+ * Required
+ *
+ * @var Gems_Menu
+ */
+ protected $menu;
+
+ /**
+ * Required
+ *
+ * @var Zend_Controller_Request_Abstract
+ */
+ protected $request;
+
+ /**
+ * Create the snippets content
+ *
+ * This is a stub function either override getHtmlOutput() or override render()
+ *
+ * @param Zend_View_Abstract $view Just in case it is needed here
+ * @return MUtil_Html_HtmlInterface Something that can be rendered
+ */
+ public function getHtmlOutput(Zend_View_Abstract $view)
+ {
+ $menuList = $this->menu->getMenuList();
+
+ $menuList->addParameterSources($this->request)
+ ->addCurrentParent($this->_('Cancel'))
+ ->addCurrentChildren();
+
+ return $menuList;
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|