public static function make() { $itemFactory = new itemFactory(); $collectionFactory = new ItemCollectionFactory(); $config = new SectionConfig(); $formatter = new FieldFormatter(); $config->setItemFactory($itemFactory)->setFactory($collectionFactory); $config->add("settings", function ($settings, $param) use($formatter) { $settings->setFormatter($formatter); }); return $config; }
public function setConfig(SectionConfig $config) { $this->addItem($config->setName(self::CONFIG_KEY)); return $this; }