Bolt\Config::getFields PHP Method

getFields() public method

A getter to access the fields manager.
public getFields ( ) : Manager
return Bolt\Storage\Field\Manager
    public function getFields()
    {
        return $this->fields;
    }

Usage Example

Example #1
0
 /**
  * Build the schema for Bolt ContentType tables.
  *
  * @param Schema $schema
  * @param Config $config
  *
  * @return \Doctrine\DBAL\Schema\Table[]
  */
 public function getSchemaTables(Schema $schema, Config $config)
 {
     /** @var $fieldManager FieldManager */
     $fieldManager = $config->getFields();
     $contentTypes = $config->get('contenttypes');
     $tables = [];
     foreach ($this->tables->keys() as $name) {
         $contentType = $contentTypes[$name];
         $tables[$name] = $this->tables[$name]->buildTable($schema, $this->prefix . $name, $name);
         if (isset($contentType['fields']) && is_array($contentType['fields'])) {
             $this->addContentTypeTableColumns($this->tables[$name], $tables[$name], $contentType['fields'], $fieldManager);
         }
     }
     return $tables;
 }
All Usage Examples Of Bolt\Config::getFields