removeByName() 공개 메소드

remove config by group name
public removeByName ( string $name, string $siteKey = 'default' ) : void
$name string config group name
$siteKey string site key
리턴 void
예제 #1
0
 public function testRemoveByName()
 {
     list($repo, $validator) = $this->getMocks();
     $mockConfig = m::mock('Xpressengine\\Config\\ConfigEntity');
     $mockConfig->name = 'board.notice';
     $repo->shouldReceive('find')->once()->with('default', 'board.notice')->andReturn($mockConfig);
     $repo->shouldReceive('fetchParent')->with('default', 'board.notice')->andReturn([]);
     $repo->shouldReceive('remove')->once()->with('default', 'board.notice')->andReturnNull();
     $instance = new ConfigManager($repo, $validator);
     $instance->removeByName('board.notice');
 }
예제 #2
0
 /**
  * Delete menu item config consisting of theme identifiers
  *
  * @param MenuItem $item menu item instance
  * @return void
  */
 public function deleteMenuItemTheme(MenuItem $item)
 {
     $this->configs->removeByName($this->menuKeyString($item));
 }
예제 #3
0
 /**
  * instance 에 속한 comment 를 제거함, table 도 삭제 됨
  *
  * @param string $instanceId instance identifier
  * @return void
  */
 public function drop($instanceId)
 {
     $this->repo->dropInstance($instanceId);
     $this->configs->removeByName($this->getConfigKey($instanceId));
 }
예제 #4
0
 /**
  * removePageConfig
  *
  * @param string $pageId page instance id
  *
  * @return void
  */
 protected function removePageConfig($pageId)
 {
     $configName = $this->getConfigKeyString($pageId);
     $this->configManager->removeByName($configName);
 }
 /**
  * Process to delete
  *
  * @param $instanceId
  *
  * @return mixed
  */
 public function deleteMenu($instanceId)
 {
     $configName = $this->getPageConfigKeyString($instanceId);
     $this->configManager->removeByName($configName);
 }
 /**
  * deleteMenuItemTheme
  *
  * @param MenuItem $item to delete theme menu item instance
  *
  * @return void
  */
 public function deleteMenuItemTheme(MenuItem $item)
 {
     $configKeyString = $item->getBreadCrumbsKeyString();
     $this->configManager->removeByName("{$this->menuKeyword}.{$configKeyString}");
 }