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


PHP ConfigManager::clearConfigurableCache方法代码示例

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


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

示例1: up

 /**
  * @inheritdoc
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $this->configManager->clearCache();
     $this->configManager->clearConfigurableCache();
     if ($schema instanceof ExtendSchema) {
         $queries->addQuery(new RefreshExtendCacheMigrationQuery($this->commandExecutor));
     }
 }
开发者ID:xamin123,项目名称:platform,代码行数:11,代码来源:RefreshExtendCacheMigration.php

示例2: up

 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $this->configManager->clearCache();
     $this->configManager->clearConfigurableCache();
     if ($schema instanceof ExtendSchema) {
         $queries->addQuery(new RefreshExtendConfigMigrationQuery($this->commandExecutor, $this->dataStorageExtension->get('initial_entity_config_state', []), $this->initialEntityConfigStatePath));
         $queries->addQuery(new RefreshExtendCacheMigrationQuery($this->commandExecutor));
     }
 }
开发者ID:hugeval,项目名称:platform,代码行数:12,代码来源:RefreshExtendCacheMigration.php

示例3: execute

 /**
  * Runs command
  *
  * @param  InputInterface  $input
  * @param  OutputInterface $output
  * @throws \InvalidArgumentException
  * @return int|null|void
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $output->writeln($this->getDescription());
     $this->configManager = $this->getContainer()->get('oro_entity_config.config_manager');
     /** @var Kernel $kernel */
     $kernel = $this->getContainer()->get('kernel');
     foreach ($kernel->getBundles() as $bundle) {
         $path = $bundle->getPath() . '/Resources/config/entity_extend.yml';
         if (is_file($path)) {
             $config = Yaml::parse(realpath($path));
             foreach ($config as $className => $entityOptions) {
                 $className = class_exists($className) ? $className : 'Extend\\Entity\\' . $className;
                 $this->parseEntity($className, $entityOptions);
             }
             $this->configManager->flush();
             $output->writeln('Done');
         }
     }
     $this->getContainer()->get('oro_entity_extend.tools.dumper')->clear();
     $this->configManager->clearConfigurableCache();
 }
开发者ID:ashutosh-srijan,项目名称:findit_akeneo,代码行数:29,代码来源:InitCommand.php

示例4: load

 /**
  * Load entity configs from annotations to a database
  *
  * @param bool                 $force  Force overwrite config's option values
  * @param callable|null        $filter function (ClassMetadataInfo[] $doctrineAllMetadata)
  * @param LoggerInterface|null $logger
  * @param bool                 $dryRun Log modifications without apply them
  * @throws \Exception
  */
 public function load($force = false, \Closure $filter = null, LoggerInterface $logger = null, $dryRun = false)
 {
     $this->logger = $logger ?: new NullLogger();
     try {
         /** @var ClassMetadataInfo[] $doctrineAllMetadata */
         $doctrineAllMetadata = $this->configManager->getEntityManager()->getMetadataFactory()->getAllMetadata();
         if (null !== $filter) {
             $doctrineAllMetadata = $filter($doctrineAllMetadata);
         }
         foreach ($doctrineAllMetadata as $metadata) {
             $this->loadEntityConfigs($metadata, $force);
         }
         if ($dryRun) {
             $this->configManager->clear();
         } else {
             $this->configManager->flush();
             $this->configManager->clearCache();
             $this->configManager->clearConfigurableCache();
         }
     } catch (\Exception $ex) {
         $this->logger = null;
         throw $ex;
     }
 }
开发者ID:xamin123,项目名称:platform,代码行数:33,代码来源:ConfigLoader.php

示例5: testClearConfigurableCache

 public function testClearConfigurableCache()
 {
     $this->configCache->expects($this->once())->method('deleteAllConfigurable');
     $this->modelManager->expects($this->once())->method('clearCheckDatabase');
     $this->configManager->clearConfigurableCache();
 }
开发者ID:Maksold,项目名称:platform,代码行数:6,代码来源:ConfigManagerTest.php

示例6: renameExtendColumns

 protected function renameExtendColumns(Schema $schema, QueryBag $queries, ConfigManager $configManager)
 {
     /** @var EntityMetadataHelper $entityMetadataHelper */
     $entityMetadataHelper = $this->container->get('oro_entity_extend.migration.entity_metadata_helper');
     $configManager->clearConfigurableCache();
     /** @var EntityConfigId[] $entityConfigIds */
     $entityConfigIds = $configManager->getIds('extend');
     foreach ($entityConfigIds as $entityConfigId) {
         if ($configManager->getConfig($entityConfigId)->is('is_extend')) {
             $tableName = $entityMetadataHelper->getTableNameByEntityClass($entityConfigId->getClassName());
             if ($tableName && $schema->hasTable($tableName)) {
                 $table = $schema->getTable($tableName);
                 /** @var FieldConfigId[] $fieldConfigIds */
                 $fieldConfigIds = $configManager->getIds('extend', $entityConfigId->getClassName());
                 foreach ($fieldConfigIds as $fieldConfigId) {
                     if ($configManager->getConfig($fieldConfigId)->is('extend')) {
                         $this->renameExtendField($schema, $queries, $table, $fieldConfigId, $configManager, $entityMetadataHelper);
                     }
                 }
             }
         }
     }
 }
开发者ID:Maksold,项目名称:platform,代码行数:23,代码来源:RenameExtendTablesAndColumns.php

示例7: warmUp

 /**
  * {@inheritdoc}
  */
 public function warmUp($cacheDir)
 {
     $this->configManager->clearCache();
     $this->configManager->clearConfigurableCache();
     $this->dumper->dump();
 }
开发者ID:northdakota,项目名称:platform,代码行数:9,代码来源:EntityCacheWarmer.php


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