Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public function setConfig(SectionConfig $config)
 {
     $this->addItem($config->setName(self::CONFIG_KEY));
     return $this;
 }