本文整理汇总了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");
}
}
}