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


PHP ArrayManager::getObjectsArrayFieldValues方法代码示例

本文整理汇总了PHP中Includes\Utils\ArrayManager::getObjectsArrayFieldValues方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayManager::getObjectsArrayFieldValues方法的具体用法?PHP ArrayManager::getObjectsArrayFieldValues怎么用?PHP ArrayManager::getObjectsArrayFieldValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Includes\Utils\ArrayManager的用法示例。


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

示例1: getTranslationCodes

 /**
  * Get translation codes
  *
  * @return array
  */
 public function getTranslationCodes()
 {
     return \Includes\Utils\ArrayManager::getObjectsArrayFieldValues($this->getTranslations()->toArray(), 'getCode');
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:9,代码来源:I18n.php

示例2: checkAddonsKeys

 /**
  * The certain request handler
  *
  * @param integer $ttl Data TTL OPTIONAL
  *
  * @return boolean
  */
 public function checkAddonsKeys($ttl = self::TTL_LONG)
 {
     $repoModuleKey = \XLite\Core\Database::getRepo('\\XLite\\Model\\ModuleKey');
     $keys = array_unique(\Includes\Utils\ArrayManager::getObjectsArrayFieldValues($repoModuleKey->findAll(), 'getKeyValue', true));
     $result = $this->performActionWithTTL($ttl, static::ACTION_CHECK_ADDON_KEY, array(static::FIELD_KEY => $keys), false);
     if (static::TTL_NOT_EXPIRED !== $result) {
         $repoModule = \XLite\Core\Database::getRepo('\\XLite\\Model\\Module');
         foreach ((array) $result as $key => $addonsInfo) {
             $repoModuleKey->deleteInBatch($repoModuleKey->findBy(array('keyValue' => $key)));
             foreach ($addonsInfo as $info) {
                 $module = $repoModule->findOneBy(array('author' => $info['author'], 'name' => $info['name']));
                 if ($module) {
                     $repoModuleKey->insert($info + array('keyValue' => $key));
                     // Clear cache for proper installation
                     \XLite\Core\Marketplace::getInstance()->clearActionCache(\XLite\Core\Marketplace::ACTION_GET_ADDONS_LIST);
                 } else {
                     // No module has been found
                 }
             }
         }
     }
     return (bool) $result;
 }
开发者ID:kingsj,项目名称:core,代码行数:30,代码来源:Marketplace.php

示例3: checkAddonsKeys

 /**
  * The certain request handler
  *
  * @param integer $ttl Data TTL OPTIONAL
  *
  * @return boolean
  */
 public function checkAddonsKeys($ttl = null)
 {
     $repoModuleKey = \XLite\Core\Database::getRepo('\\XLite\\Model\\ModuleKey');
     $keys = array_unique(\Includes\Utils\ArrayManager::getObjectsArrayFieldValues($repoModuleKey->findAll(), 'getKeyValue', true));
     if (!empty($keys)) {
         $result = $this->performActionWithTTL($ttl, static::ACTION_CHECK_ADDON_KEY, array(static::FIELD_KEY => $keys), false);
     } else {
         $result = null;
     }
     if (static::TTL_NOT_EXPIRED !== $result) {
         $repoModule = \XLite\Core\Database::getRepo('\\XLite\\Model\\Module');
         foreach ((array) $result as $key => $addonsInfo) {
             foreach ($addonsInfo as $info) {
                 if ('CDev' == $info['author'] && 'Core' == $info['name']) {
                     // Entity is core
                     $isValid = true;
                 } else {
                     // Entity is module. Search for existing module
                     $isValid = (bool) $repoModule->findOneBy(array('author' => $info['author'], 'name' => $info['name']));
                 }
                 // Search for existing module key
                 $keyModel = $repoModuleKey->findOneBy(array('keyValue' => $key, 'author' => $info['author'], 'name' => $info['name']));
                 if ($isValid) {
                     if ($keyModel) {
                         $repoModuleKey->update($keyModel, $info);
                     } else {
                         $repoModuleKey->insert($info + array('keyValue' => $key));
                     }
                     // Clear cache for proper installation
                     $this->clearActionCache(\XLite\Core\Marketplace::ACTION_GET_ADDONS_LIST);
                 } else {
                     // No module has been found
                     if ($keyModel) {
                         $repoModuleKey->delete($keyModel);
                     }
                 }
             }
         }
     }
     return (bool) $result;
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:48,代码来源:Marketplace.php

示例4: getErrorMessages

 /**
  * Return list of error messages
  *
  * @return array
  */
 public function getErrorMessages()
 {
     if (!isset($this->errorMessages)) {
         $this->errorMessages = array();
         $freeSpaceError = $this->isFreeSpaceCheckAvailable() ? $this->checkDiskFreeSpace() : false;
         if (!$this->isUnpacked() && $freeSpaceError) {
             $this->errorMessages[self::CORE_IDENTIFIER] = array($freeSpaceError);
         }
         $this->errorMessages = array_merge($this->errorMessages, \Includes\Utils\ArrayManager::getObjectsArrayFieldValues($this->getEntries(), 'getErrorMessages'));
         $this->errorMessages = array_filter($this->errorMessages);
     }
     return $this->errorMessages;
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:18,代码来源:Cell.php

示例5: isUpgradeEntryAvailable

 /**
  * Check if upgrade or update is available on Marketplace.
  *
  * @return boolean
  */
 public function isUpgradeEntryAvailable()
 {
     \XLite\Upgrade\Cell::getInstance()->clear();
     return (bool) array_filter(\Includes\Utils\ArrayManager::getObjectsArrayFieldValues(\XLite\Upgrade\Cell::getInstance()->getEntries(), 'isEnabled'));
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:10,代码来源:AAdmin.php


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