-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Ueberschaer
committed
Sep 5, 2016
1 parent
80c19da
commit 0e7803d
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
templates/plugins/function.mufilesSpecialCollectionMenue.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/** | ||
* MUFiles. | ||
* | ||
* @copyright Michael Ueberschaer (MU) | ||
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License | ||
* @package MUFiles | ||
* @author Michael Ueberschaer <[email protected]>. | ||
* @link http://webdesign-in-bremen.com | ||
* @link http://zikula.org | ||
* @version Generated by ModuleStudio 0.7.0 (http://modulestudio.de). | ||
*/ | ||
|
||
/** | ||
* The mufilesSpecialCollectionMenue plugin provides a special menue of collections. | ||
* | ||
* Available parameters: | ||
* - collectionid: Optional id of element as part of unique error message element. | ||
* - imageid: | ||
* - assign: If set, the results are assigned to the corresponding variable instead of printed out. | ||
* | ||
* @param array $params All attributes passed to this function from the template. | ||
* @param Zikula_Form_View $view Reference to the view object. | ||
* | ||
* @return string The output of the plugin. | ||
*/ | ||
function smarty_function_mufilesSpecialCollectionMenue($params, $view) | ||
{ | ||
if ($params['collectionId']) { | ||
$collectionId = $params['collectionId']; | ||
} else { | ||
$collectionId = 0; | ||
} | ||
|
||
if ($params['imageId']) { | ||
$imageId = $params['imageId']; | ||
} else { | ||
$imageId = 0; | ||
} | ||
|
||
$menue = MUFiles_Util_Menue::getCollectionMenue($collectionId); | ||
|
||
|
||
if (array_key_exists('assign', $params)) { | ||
$view->assign($params['assign'], $menue); | ||
|
||
return; | ||
} | ||
|
||
return $menue; | ||
} |