本文整理匯總了PHP中Menu::getName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Menu::getName方法的具體用法?PHP Menu::getName怎麽用?PHP Menu::getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Menu
的用法示例。
在下文中一共展示了Menu::getName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Menu
</li>
</ul>
</div>
<div class="row" >
<div class="box col-md-12" >
<div class="box-inner" >
<div class="box-header well" data-original-title="">
<h2><i class="glyphicon glyphicon-edit"></i> Add Menu</h2>
</div>
<div class="box-conten" >
<?php
$id = Request::get("id");
if (is_numeric($id) && $id > 0) {
$menuObj = new Menu();
$menuObj->set("menu_id", $id);
$result = $menuObj->getName();
if (count($result)) {
$row = $result[0];
$menu_id = $row['id'];
$menu_name = $row['name'];
$category_id = $row['category_id'];
$parent_id = $row['parent_id'];
$results = MENU_IMG_URL . "/" . $row['image'];
$url = $row['url'];
$access_type = $row['access_type'];
$menu_order = $row['menu_order'];
$menu_status = $row['active'];
}
}
?>
<form action="" method="post" enctype="multipart/form-data">
示例2: array
<?php
/* @var $this MenuController */
/* @var $model Menu */
$this->breadcrumbs = array('Menus' => array('index'), $model->name);
?>
<h3 class="title">查看 菜單 <?php
echo $model->name;
?>
</h3>
<?php
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'name', array('name' => 'pid', 'value' => Menu::getName($model->pid)), array('name' => 'url', 'type' => 'raw', 'value' => CHtml::link($model->url, $model->url, array("target" => "_blank"))), 'orderid', array('name' => 'is_show', 'value' => $model->is_show == 1 ? "是" : "否"), array('name' => 'create_uid', 'value' => User::getName($model->create_uid)), 'create_time', array('name' => 'update_uid', 'value' => User::getName($model->update_uid)), 'update_time')));
示例3: addMenu
public function addMenu(Menu $inMenu)
{
$permissionEngine = PermissionEngine::getInstance();
if (!$permissionEngine->currentUserCanDo("userCanAddMenus")) {
return false;
}
$database = Database::getInstance();
if (!$database->isConnected()) {
return false;
}
$menuName = $database->escapeString($inMenu->getName());
$themeRegion = $database->escapeString($inMenu->getThemeRegion());
if ($inMenu->isEnabled()) {
$enabled = 1;
} else {
$enabled = 0;
}
$results = $database->insertData("menu", "'menuName', 'themeRegion', 'enabled'", "'{$menuName}', '{$themeRegion}', {$enabled}");
if ($results === false) {
return false;
}
return true;
}
示例4: testSetNameAndGetName
/**
* @corvers InakaPhper\Lunchlog\Entity\Menu::setName
* @corvers InakaPhper\Lunchlog\Entity\Menu::getName
*/
public function testSetNameAndGetName()
{
$this->entity->setName('inaka');
$this->assertEquals('inaka', $this->entity->getName());
}
示例5: addChild
public function addChild(Menu $child)
{
$child->parent = $this;
$name = $child->getName();
if (!isset($this->children[$name])) {
$this->children[$name] = $child;
} else {
if ($this->children[$name] !== $child) {
throw new \Exception("duplicate child");
}
}
}