Implements \Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
Overrides DerivativeInterface::getDerivativeDefinitions
public function getDerivativeDefinitions(array $base_plugin_definition) {
// Provide a block plugin definition for each aggregator category.
$result = db_query('SELECT cid, title FROM {aggregator_category} ORDER BY title');
foreach ($result as $category) {
$this->derivatives[$category->cid] = $base_plugin_definition;
$this->derivatives[$category->cid]['delta'] = $category->cid;
$this->derivatives[$category->cid]['admin_label'] = t('@title category latest items', array(
'@title' => $category->title,
));
}
return $this->derivatives;
}