/** * 정렬 확장 기능 목록 * * @return array */ public function getOrders() { $names = $this->register->get(Module\Board::getId() . PluginRegister::KEY_DELIMITER . self::ORDER_REGISTER_NAME); $classes = []; foreach ($names as $name) { $classes[$name] = new $name(); } return $classes; }
/** * 등록된 order 반환 * * @return array */ public function gets() { $names = $this->register->get('module/board@board/order'); $classes = []; foreach ($names as $id => $name) { $classes[$id] = new $name(); } return $classes; }
/** * container 에서 field skin class name 반환. * AbstractSkin class instance * * @param Handler $handler dynamic field handler * @param string $id field type id * @return \Generator */ public function getSkinsByType(Handler $handler, $id) { /** @var \Xpressengine\DynamicField\AbstractSkin $skin */ foreach ($this->register->get($id . PluginRegister::KEY_DELIMITER . self::FIELD_SKIN) as $skin) { (yield $this->getSkin($handler, $skin::getId())); } }
/** * getModuleObject * * @param string $moduleId module id to get module object * * @return mixed */ public function getModuleObject($moduleId) { $moduleId = fullModuleId($moduleId); $moduleName = $this->register->get($moduleId); if ($moduleName === null) { throw new NotFoundModuleException(); } $menuTypeObj = new $moduleName(); return $menuTypeObj; }
/** * type 에 해당하는 모든 메뉴 아이템목록을 반환 * * @param string $id target plugin id * @return array */ public function all($id) { return $this->register->get($this->getTypeKey($id)) ?: []; }
/** * 등록된 모든 UIObject의 목록을 반환한다. * * @return array */ public function getAll() { return $this->register->get('uiobject'); }
/** * Get all registered tools * * @return array */ public function getToolAll() { return $this->register->get('editortool') ?: []; }