wCMF
3.6
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Groups
Pages
function.count_items.php
Go to the documentation of this file.
1
<?php
2
/**
3
* wCMF - wemove Content Management Framework
4
* Copyright (C) 2005-2014 wemove digital solutions GmbH
5
*
6
* Licensed under the terms of any of the following licenses
7
* at your choice:
8
*
9
* - GNU Lesser General Public License (LGPL)
10
* http://www.gnu.org/licenses/lgpl.html
11
* - Eclipse Public License (EPL)
12
* http://www.eclipse.org/org/documents/epl-v10.php
13
*
14
* See the license.txt file distributed with this work for
15
* additional information.
16
*
17
* $Id: function.count_items.php 1462 2014-02-04 23:52:27Z iherwig $
18
*/
19
20
/*
21
* Smarty plugin
22
* -------------------------------------------------------------
23
* File: function.count_items.php
24
* Type: function
25
* Name: count_items
26
* Purpose: count the items of an array and assign it to a template
27
* variable
28
* Usage: e.g. {count_items varname="numNodes" array=$nodes}
29
* -------------------------------------------------------------
30
*/
31
function
smarty_function_count_items
($params, &$smarty)
32
{
33
if
(is_array($params[
'array'
]))
34
$smarty->assign($params[
'varname'
],
sizeof
($params[
'array'
]));
35
}
36
?>
smarty_function_count_items
smarty_function_count_items($params, &$smarty)
Definition:
function.count_items.php:31
wcmf3.x
SVN
framework
wcmf
lib
presentation
smarty_plugins
function.count_items.php
Generated on Wed Feb 5 2014 10:51:06 for wCMF by
1.8.6