get() public méthode

config entity 반환
public get ( string $group, string $id ) : ConfigEntity | null
$group string group name
$id string dynamic field id
Résultat Xpressengine\Config\ConfigEntity | null
 /**
  * get dynamic field without skin instance
  *
  * @param string $group config group name
  * @param string $id    field type id
  * @return AbstractType
  */
 public function getType($group, $id)
 {
     $config = $this->configHandler->get($group, $id);
     if ($config == null) {
         return null;
     }
     $type = $this->registerHandler->getType($this, $config->get('typeId'));
     $type->setConfig($config);
     return $type;
 }
 /**
  * test get config
  *
  * @return void
  */
 public function testGet()
 {
     $parent = m::mock('Xpressengine\\Config\\ConfigEntity');
     $config1 = m::mock('Xpressengine\\Config\\ConfigEntity');
     $conn = m::mock('Xpressengine\\Database\\VirtualConnectionInterface');
     $configManager = m::mock('Xpressengine\\Config\\ConfigManager');
     $configManager->shouldReceive('get')->with(sprintf('%s.%s.%s', ConfigHandler::CONFIG_NAME, 'group', 'id'))->andReturn($config1);
     $configManager->shouldReceive('get')->with(sprintf('%s.%s', ConfigHandler::CONFIG_NAME, 'group'))->andReturn($parent);
     $configManager->shouldReceive('get')->with(sprintf('%s.%s', ConfigHandler::CONFIG_NAME, 'group_null'))->andReturn(null);
     $configManager->shouldReceive('children')->andReturn([$config1]);
     $handler = new ConfigHandler($conn, $configManager);
     $this->assertInstanceOf('Xpressengine\\Config\\ConfigEntity', $handler->get('group', 'id'));
     $this->assertEquals(1, count($handler->gets('group')));
     $this->assertEquals(0, count($handler->gets('group_null')));
 }