Mercurial > hg > isophonics-drupal-site
view core/lib/Drupal/Component/Plugin/Derivative/DeriverBase.php @ 11:bfffd8d7479a
Move drupal/core from "replace" to "require" section, to ensure Composer updates it
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:51:18 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php namespace Drupal\Component\Plugin\Derivative; /** * Provides a basic deriver. */ abstract class DeriverBase implements DeriverInterface { /** * List of derivative definitions. * * @var array */ protected $derivatives = []; /** * {@inheritdoc} */ public function getDerivativeDefinition($derivative_id, $base_plugin_definition) { if (!empty($this->derivatives) && !empty($this->derivatives[$derivative_id])) { return $this->derivatives[$derivative_id]; } $this->getDerivativeDefinitions($base_plugin_definition); return $this->derivatives[$derivative_id]; } /** * {@inheritdoc} */ public function getDerivativeDefinitions($base_plugin_definition) { return $this->derivatives; } }