Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function extractConfig($key, Config $config, BootstrapConfigModel $model)
 {
     if ($config->has($key)) {
         $config = $config->get($key);
         $keys = explode('.', $key);
         $model->name = end($keys);
         $model->icons_template = $config['template'];
         $model->icons_paths = implode("\n", (array) $config['paths']);
         $model->icons_path = $config['path'];
         $model->icons_source = 'paths';
     }
 }
Ejemplo n.º 2
0
 /**
  * Get unused types.
  *
  * @param bool $keysOnly Return keys only. Otherwise type objects are returned.
  *
  * @return Type[]|array
  */
 public function getUnusedTypes($keysOnly = false)
 {
     $types = array();
     foreach ($this->types as $name => $type) {
         if ($type->isMultiple()) {
             if ($type->isNameEditable()) {
                 $types[$name] = $type;
             }
             continue;
         }
         if (!$this->config->has($type->getPath())) {
             $types[$name] = $type;
         }
     }
     if ($keysOnly) {
         return array_keys($types);
     }
     return $types;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function has($key)
 {
     return $this->local->has($key) || $this->global->has($key);
 }