/** * Overwrites LazyPluginCollection::get(). */ public function &get($instance_id) { /* @var \Drupal\restful\Plugin\resource\ResourceInterface $resource */ $resource = parent::get($instance_id); // Allow altering the resource, this way we can read the resource's // definition to return a different class that is using composition. drupal_alter('restful_resource', $resource); $resource = $resource->isEnabled() ? $resource : NULL; return $resource; }
/** * {@inheritdoc} * * @return \Drupal\tour\TipPluginInterface */ public function &get($instance_id) { return parent::get($instance_id); }