本文整理汇总了PHP中Node::getActionLinks方法的典型用法代码示例。如果您正苦于以下问题:PHP Node::getActionLinks方法的具体用法?PHP Node::getActionLinks怎么用?PHP Node::getActionLinks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Node
的用法示例。
在下文中一共展示了Node::getActionLinks方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getActionLinks
public function getActionLinks()
{
$links = parent::getActionLinks();
if ($this->checkPermission(ACL::UPDATE)) {
$links['todoaction'] = array('href' => '?q=todo.rpc&action=toggle&id=' . $this->id . '&destination=CURRENT', 'title' => $this->closed ? t('Реактивировать') : t('Выполнено'), 'icon' => 'todoaction');
}
return $links;
}
示例2: getActionLinks
public function getActionLinks()
{
$links = parent::getActionLinks();
$user = Context::last()->user;
if ($user->id != $this->id and $this->published and $user->hasAccess(ACL::UPDATE, 'user')) {
$links['su'] = array('href' => 'auth/su.rpc?id=' . $this->id . '&destination=CURRENT', 'title' => 'Переключиться в пользователя', 'icon' => 'sudo');
}
if ($count = $this->getDB()->fetch("SELECT COUNT(*) FROM node WHERE deleted = 0 AND class IN (SELECT name FROM node WHERE class = 'type' AND deleted = 0 AND published = 1) AND id IN (SELECT tid FROM node__rel WHERE nid = ? AND `key` = 'uid')", array($this->id))) {
$links['search'] = array('href' => 'admin/content/list?search=uid%3A' . $this->id, 'title' => t('Найти документы пользователя'), 'icon' => 'search');
}
return $links;
}
示例3: getActionLinks
public function getActionLinks()
{
$links = parent::getActionLinks();
$tmp = Node::create($this->name);
if (in_array($this->name, self::getInternal())) {
$links['delete'] = null;
}
if ($tmp->canEditFields()) {
$links['fields'] = array('title' => t('Настроить поля'), 'href' => 'admin/structure/fields?type=' . $this->name . '&destination=CURRENT');
} else {
if (isset($links['clone'])) {
unset($links['clone']);
}
if (isset($links['delete'])) {
unset($links['delete']);
}
}
$links['touch'] = array('title' => t('Обновить документы'), 'href' => 'admin/structure/types/refresh?type=' . $this->name . '&destination=CURRENT', 'description' => t('Пересохраняет все документы этого типа, обновляет XML.'));
$links['access'] = array('title' => t('Изменить права'), 'href' => 'admin/structure/access?type=' . urlencode($this->name) . '&destination=CURRENT');
return $links;
}
示例4: getActionLinks
public function getActionLinks()
{
$links = parent::getActionLinks();
$links['locate'] = null;
return $links;
}
示例5: getActionLinks
/**
* Дополнительные действия для предварительного просмотра.
*/
public function getActionLinks()
{
return array_merge(parent::getActionLinks(), array('find' => array('title' => t('Показать документы'), 'href' => 'admin/content/list?search=tags%3A' . $this->id), 'manage' => array('title' => t('Изменить документы'), 'href' => 'admin/content/labels/manage?id=' . $this->id . '&destination=CURRENT')));
}
示例6: getActionLinks
/**
* Дополнительные действия для предварительного просмотра.
*/
public function getActionLinks()
{
return array_merge(parent::getActionLinks(), array('find' => array('title' => t('Показать документы'), 'href' => 'admin/content/list?search=tags%3A' . $this->id)));
}
示例7: getActionLinks
public function getActionLinks()
{
$links = parent::getActionLinks();
$links['find'] = array('href' => 'admin/access/users?search=tags%3A' . $this->id, 'title' => t('Показать пользователей'));
return $links;
}
示例8: getActionLinks
public function getActionLinks()
{
$list = parent::getActionLinks();
$list['locate'] = array('href' => "download/{$this->id}/{$this->filename}", 'title' => t('Скачать'));
if (array_key_exists('clone', $list)) {
unset($list['clone']);
}
if ($this->checkPermission(ACL::UPDATE)) {
$list['replace'] = array('icon' => 'upload', 'title' => t('Заменить файл'), 'href' => "admin/node/{$this->id}/upload?destination=CURRENT");
}
return $list;
}