/** * Taxonomy constructor. * * @param array $elements * @param MetadataDriver $metadata */ public function __construct(array $elements = [], MetadataDriver $metadata = null) { parent::__construct($elements); if ($metadata) { $this->config = $metadata->getTaxonomyConfig(); } }