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


PHP modObjectGetListProcessor类代码示例

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


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


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