当前位置: 首页>>代码示例>>PHP>>正文


PHP Node::getActionLinks方法代码示例

本文整理汇总了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;
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:8,代码来源:node.todo.php

示例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;
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:12,代码来源:node.user.php

示例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;
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:21,代码来源:node.type.php

示例4: getActionLinks

 public function getActionLinks()
 {
     $links = parent::getActionLinks();
     $links['locate'] = null;
     return $links;
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:6,代码来源:node.subscription.php

示例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')));
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:7,代码来源:node.label.php

示例6: getActionLinks

 /**
  * Дополнительные действия для предварительного просмотра.
  */
 public function getActionLinks()
 {
     return array_merge(parent::getActionLinks(), array('find' => array('title' => t('Показать документы'), 'href' => 'admin/content/list?search=tags%3A' . $this->id)));
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:7,代码来源:node.tag.php

示例7: getActionLinks

 public function getActionLinks()
 {
     $links = parent::getActionLinks();
     $links['find'] = array('href' => 'admin/access/users?search=tags%3A' . $this->id, 'title' => t('Показать пользователей'));
     return $links;
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:6,代码来源:node.group.php

示例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;
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:12,代码来源:node.file.php


注:本文中的Node::getActionLinks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。