• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP modObjectGetListProcessor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中modObjectGetListProcessor的典型用法代码示例。如果您正苦于以下问题:PHP modObjectGetListProcessor类的具体用法?PHP modObjectGetListProcessor怎么用?PHP modObjectGetListProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了modObjectGetListProcessor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: initialize

 public function initialize()
 {
     $initialized = parent::initialize();
     $this->setDefaultProperties(array('key' => false, 'namespace' => false, 'area' => false));
     $this->dateFormat = $this->modx->getOption('manager_date_format') . ', ' . $this->modx->getOption('manager_time_format');
     return $initialized;
 }
开发者ID:adamwintle,项目名称:flexibility5,代码行数:7,代码来源:getlist.class.php


示例2: outputArray

 /** {@inheritDoc} */
 public function outputArray(array $array, $count = false)
 {
     if ($this->getProperty('addall')) {
         $array = array_merge_recursive(array(array('id' => 0, 'name' => 'Мсу')), $array);
     }
     return parent::outputArray($array, $count);
 }
开发者ID:suasti,项目名称:Companies,代码行数:8,代码来源:getlist.class.php


示例3: prepareQueryBeforeCount

 /**
  * @param xPDOQuery $c
  *
  * @return xPDOQuery
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     if ($tid = $this->getProperty('tid')) {
         $c->where(array('tid' => $tid));
     }
     return parent::prepareQueryBeforeCount($c);
 }
开发者ID:sfgoo,项目名称:xPoller2,代码行数:12,代码来源:getlist.class.php


示例4: initialize

 /** {@inheritDoc} */
 public function initialize()
 {
     if (!$this->getProperty('limit')) {
         $this->setProperty('limit', 20);
     }
     return parent::initialize();
 }
开发者ID:rafull6,项目名称:texno-service,代码行数:8,代码来源:getlist.class.php


示例5: prepareRow

 /**
  * @param xPDOObject $object
  *
  * @return array
  */
 public function prepareRow(xPDOObject $object)
 {
     $array = parent::prepareRow($object);
     if (empty($array['author'])) {
         $array['author'] = $array['username'];
     }
     $this->modx->getContext($array['context_key']);
     $array['preview_url'] = $this->modx->makeUrl($array['id'], $array['context_key']);
     $icon = $this->_modx23 ? 'icon' : 'fa';
     $array['actions'] = array();
     // View
     if (!empty($array['preview_url'])) {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-eye", 'title' => $this->modx->lexicon('tickets_action_view'), 'action' => 'viewTicket', 'button' => true, 'menu' => true);
     }
     // Edit
     $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-edit", 'title' => $this->modx->lexicon('tickets_action_edit'), 'action' => 'editTicket', 'button' => false, 'menu' => true);
     // Duplicate
     $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-files-o", 'title' => $this->modx->lexicon('tickets_action_duplicate'), 'action' => 'duplicateTicket', 'button' => false, 'menu' => true);
     // Publish
     if (!$array['published']) {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-power-off action-green", 'title' => $this->modx->lexicon('tickets_action_publish'), 'multiple' => $this->modx->lexicon('tickets_action_publish'), 'action' => 'publishTicket', 'button' => true, 'menu' => true);
     } else {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-power-off action-gray", 'title' => $this->modx->lexicon('tickets_action_unpublish'), 'multiple' => $this->modx->lexicon('tickets_action_unpublish'), 'action' => 'unpublishTicket', 'button' => true, 'menu' => true);
     }
     // Delete
     if (!$array['deleted']) {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o action-red", 'title' => $this->modx->lexicon('tickets_action_delete'), 'multiple' => $this->modx->lexicon('tickets_action_delete'), 'action' => 'deleteTicket', 'button' => false, 'menu' => true);
     } else {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-undo action-green", 'title' => $this->modx->lexicon('tickets_action_undelete'), 'multiple' => $this->modx->lexicon('tickets_action_undelete'), 'action' => 'undeleteTicket', 'button' => true, 'menu' => true);
     }
     // Menu
     $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-cog actions-menu", 'menu' => false, 'button' => true, 'action' => 'showMenu', 'type' => 'menu');
     return $array;
 }
开发者ID:novosad,项目名称:denant,代码行数:39,代码来源:getlist.class.php


示例6: initialize

 public function initialize()
 {
     $this->setDefaultProperties(array('profile' => 0, 'search' => ''));
     $this->canEdit = $this->modx->hasPermission('save');
     $this->canRemove = $this->modx->hasPermission('remove');
     return parent::initialize();
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:7,代码来源:getlist.class.php


示例7: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->leftJoin($this->classKey, 'Children');
     $c->where(array($this->classKey . '.parent' => $this->getProperty('id')));
     $c->groupby($this->classKey . '.text');
     return parent::prepareQueryBeforeCount($c);
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:7,代码来源:getnodes.class.php


示例8: prepareRow

 /**
  * Prepare the row for iteration
  * @param xPDOObject $object
  * @return array
  */
 public function prepareRow(xPDOObject $object)
 {
     $resourceArray = parent::prepareRow($object);
     foreach ($resourceArray as $field => $value) {
         if (!in_array($field, array('id', 'pagetitle', 'published', 'deleted', 'hidemenu', 'isfolder', 'publishedon', 'context_key', 'properties'))) {
             unset($resourceArray[$field]);
             continue;
         }
         // avoid null on returns
         $resourceArray[$field] = $resourceArray[$field] !== null ? $resourceArray[$field] : '';
     }
     $settings = $object->getProperties('gridclasskey');
     if (is_array($settings) && !empty($settings)) {
         foreach ($settings as $k => $v) {
             $resourceArray['gridclasskey-property-' . $k] = $v;
         }
     }
     if (isset($resourceArray['publishedon'])) {
         $publishedon = strtotime($resourceArray['publishedon']);
         $resourceArray['publishedon_date'] = strftime($this->modx->getOption('gridclasskey.mgr_date_format', null, '%b %d'), $publishedon);
         $resourceArray['publishedon_time'] = strftime($this->modx->getOption('gridclasskey.mgr_time_format', null, '%H:%I %p'), $publishedon);
         $resourceArray['publishedon'] = strftime('%b %d, %Y %H:%I %p', $publishedon);
     }
     $resourceArray['action_edit'] = '?a=' . $this->editAction . '&id=' . $resourceArray['id'];
     $this->modx->getContext($resourceArray['context_key']);
     $resourceArray['preview_url'] = $this->modx->makeUrl($resourceArray['id'], $resourceArray['context_key'], null, 'full');
     $c = $this->modx->newQuery('modResource');
     $c->where(array('parent' => $resourceArray['id']));
     $c->limit(1);
     $resourceArray['has_children'] = (bool) $this->modx->getCount('modResource', $c);
     return $resourceArray;
 }
开发者ID:RuGa,项目名称:GridClassKey,代码行数:37,代码来源:getlist.class.php


示例9: initialize

 /** {@inheritDoc} */
 public function initialize()
 {
     if (!$this->modx->hasPermission($this->permission)) {
         return $this->modx->lexicon('access_denied');
     }
     return parent::initialize();
 }
开发者ID:arimanr,项目名称:userprofile2,代码行数:8,代码来源:getlist.class.php


示例10: prepareRow

 /**
  * Prepare the row for iteration
  *
  * @param xPDOObject $object
  *
  * @return array
  */
 public function prepareRow(xPDOObject $object)
 {
     if ($this->getProperty('combo')) {
         return $object->get(array('id', 'name', 'pagetitle'));
     }
     $array = parent::prepareRow($object);
     $icon = $this->_modx23 ? 'icon' : 'fa';
     $array['actions'] = array();
     // View
     $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-comments-o", 'title' => $this->modx->lexicon('tickets_action_view'), 'action' => 'viewThread', 'button' => empty($array['deleted']) || empty($array['closed']), 'menu' => true);
     // Publish
     if (!$array['closed']) {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-power-off action-gray", 'title' => $this->modx->lexicon('tickets_action_close'), 'multiple' => $this->modx->lexicon('tickets_action_close'), 'action' => 'closeThread', 'button' => empty($array['deleted']), 'menu' => true);
     } else {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-power-off action-green", 'title' => $this->modx->lexicon('tickets_action_open'), 'multiple' => $this->modx->lexicon('tickets_action_open'), 'action' => 'openThread', 'button' => true, 'menu' => true);
     }
     // Delete
     if (!$array['deleted']) {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o action-yellow", 'title' => $this->modx->lexicon('tickets_action_delete'), 'multiple' => $this->modx->lexicon('tickets_action_delete'), 'action' => 'deleteThread', 'button' => false, 'menu' => true);
     } else {
         $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-undo action-green", 'title' => $this->modx->lexicon('tickets_action_undelete'), 'multiple' => $this->modx->lexicon('tickets_action_undelete'), 'action' => 'undeleteThread', 'button' => true, 'menu' => true);
     }
     $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o action-red", 'title' => $this->modx->lexicon('tickets_action_remove'), 'multiple' => $this->modx->lexicon('tickets_action_remove'), 'action' => 'removeThread', 'button' => false, 'menu' => true);
     // Menu
     $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-cog actions-menu", 'menu' => false, 'button' => true, 'action' => 'showMenu', 'type' => 'menu');
     return $array;
 }
开发者ID:soulcreate,项目名称:Tickets,代码行数:34,代码来源:getlist.class.php


示例11: outputArray

 /** {@inheritDoc} */
 public function outputArray(array $array, $count = false)
 {
     if ($this->getProperty('addall')) {
         $array = array_merge_recursive(array(array('id' => 0, 'name' => $this->modx->lexicon('mlmsystem_all'))), $array);
     }
     return parent::outputArray($array, $count);
 }
开发者ID:vgrish,项目名称:mlmsystem,代码行数:8,代码来源:getlist.class.php


示例12: initialize

 /**
  * @return bool
  */
 public function initialize()
 {
     $parent = parent::initialize();
     /** @var msDiscount $msDiscount */
     $msDiscount = $this->modx->getService('msDiscount');
     $this->_modx23 = $msDiscount->systemVersion();
     return $parent;
 }
开发者ID:bendasvadim,项目名称:msDiscount,代码行数:11,代码来源:getlist.class.php


示例13: initialize

 public function initialize()
 {
     $this->editAction = $this->modx->getObject('modAction', array('namespace' => 'core', 'controller' => 'resource/update'));
     if (!$this->getProperty('limit')) {
         $this->setProperty('limit', 20);
     }
     return parent::initialize();
 }
开发者ID:bendasvadim,项目名称:miniShop2,代码行数:8,代码来源:getlist.class.php


示例14: beforeQuery

 public function beforeQuery()
 {
     $tagId = (int) $this->getProperty('tagId');
     if (empty($tagId) || $tagId == 0) {
         return $this->modx->lexicon('tagger.err.tag_assigned_resources_tag_ns');
     }
     return parent::beforeQuery();
 }
开发者ID:hansek,项目名称:Tagger,代码行数:8,代码来源:getassignedresources.class.php


示例15: initialize

 /**
  * {@inheritDoc}
  * @return boolean
  */
 public function initialize()
 {
     $props = $this->getProperties();
     if (empty($props['contexts'])) {
         return $this->modx->lexicon($this->objectType . '_err_ns');
     }
     return parent::initialize();
 }
开发者ID:DeFi-ManriquezLuis,项目名称:MTLTransfer,代码行数:12,代码来源:autosync.class.php


示例16: initialize

 public function initialize()
 {
     $this->setDefaultProperties(array('album' => false));
     if (!$this->getProperty('album', false)) {
         return false;
     }
     return parent::initialize();
 }
开发者ID:Piterden,项目名称:modx_testfloor,代码行数:8,代码来源:getlist.class.php


示例17: initialize

 public function initialize()
 {
     $initialized = parent::initialize();
     $this->setDefaultProperties(array('search' => '', 'exclude' => ''));
     $this->canEdit = $this->modx->hasPermission('edit_context');
     $this->canRemove = $this->modx->hasPermission('delete_context');
     return $initialized;
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:8,代码来源:getlist.class.php


示例18: initialize

 /** {@inheritDoc} */
 public function initialize()
 {
     $this->ms2 = $this->modx->getService('miniShop2');
     if (!$this->modx->hasPermission($this->permission)) {
         return $this->modx->lexicon('access_denied');
     }
     return parent::initialize();
 }
开发者ID:volkovnd,项目名称:miniShop2,代码行数:9,代码来源:getlist.class.php


示例19: initialize

 public function initialize()
 {
     $this->setDefaultProperties(array('limit' => 10, 'target' => 0, 'principal_class' => 'modUserGroup', 'principal' => 0));
     $this->classKey = $this->getProperty('type');
     if (!$this->classKey) {
         return $this->modx->lexicon('access_type_err_ns');
     }
     return parent::initialize();
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:9,代码来源:getlist.class.php


示例20: prepareRow

 public function prepareRow(xPDOObject $object)
 {
     $object = parent::prepareRow($object);
     $menu = array();
     $menu[] = array('text' => $this->modx->lexicon('xlexicon.contextMenu_setting_update'), 'handler' => 'this.updateProperty');
     $menu[] = array('text' => $this->modx->lexicon('xlexicon.contextMenu_setting_remove'), 'handler' => 'this.removeProperty');
     $object['menu'] = $menu;
     return $object;
 }
开发者ID:bendasvadim,项目名称:MODX.Xlexicon,代码行数:9,代码来源:getlist.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP modObjectUpdateProcessor类代码示例发布时间:2022-05-23
下一篇:
PHP modObjectCreateProcessor类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap