本文整理汇总了PHP中MenuItem::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP MenuItem::__construct方法的具体用法?PHP MenuItem::__construct怎么用?PHP MenuItem::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MenuItem
的用法示例。
在下文中一共展示了MenuItem::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Pass the contruction call the parent and set up the name-alias relationship
* @param integer $id The id of the object
* @param string $alias The alias and name of the menusection
* @return void
*/
function __construct($id = false)
{
parent::__construct($id);
$this->loadAliases();
$this->Name = $this->alias;
Base::registerMetadata('template', 'inherit');
}
示例2: __construct
/**
* Menu constructor.
* @param $children
*/
public function __construct(array $children = array(), $displayName = null, $action = null, $iconClass = null, $className = null)
{
parent::__construct($displayName, $action, $iconClass, $className);
if (is_null($children)) {
$children = array();
}
$this->children = $children;
}
示例3: __construct
public function __construct($name, array $items = null, $label = null, $icon = null, $data = null)
{
parent::__construct($name, $label, $icon, null, null, $data);
if (!empty($items)) {
foreach ($items as $item) {
$this->addItem($item);
}
}
}
示例4: __construct
public function __construct($data = null)
{
parent::__construct($data);
if (is_array($data)) {
$checks = array('pageId' => 'is_mongoid');
if (!KLib\Validator::arrayCheck($data, $checks)) {
throw new Exception('INVALID PARAMETER MENUITEMINTERNAL', 500);
}
$this->setPageId($data['pageId']);
}
}
示例5: __construct
/**
* Class constructor
*
* @see MenuItem
* @param array $attributes
* @param string $childClass The class to use if instantiating children menu items
*/
public function __construct($attributes = array(), $childClass = 'Bundle\\MenuBundle\\MenuItem')
{
$this->childClass = $childClass;
parent::__construct(null, null, $attributes);
}
示例6:
/**
* Constructor. Load the properties of the link
* @param integer $id The id from the controller
* @return void
*/
function __construct($id, $language = false)
{
parent::__construct($id, $language);
Base::registerMetadata('link');
}
示例7:
/**
* Passes the construct call and loads information about the page
*/
function __construct($id = false, $language = false)
{
parent::__construct($id, $language);
parent::registerMetadata('template', 'inherit');
}
示例8: __construct
/**
* Constructor
*
* @param string $text
* @param optional $index
* @return void
* @access public
* @since 9/25/07
*/
public function __construct($text, $index = 1)
{
parent::__construct($text, $index);
$this->_type = BLANK;
}
示例9: __construct
public function __construct($name, $href, $icon)
{
parent::__construct($name, $href);
$this->icon = $icon;
}