function SandwichBase::calories

Same name and namespace in other branches
  1. 3.x modules/plugin_type_example/src/SandwichBase.php \Drupal\plugin_type_example\SandwichBase::calories()

Overrides SandwichInterface::calories

File

modules/plugin_type_example/src/SandwichBase.php, line 43

Class

SandwichBase
A base class to help developers implement their own sandwich plugins.

Namespace

Drupal\plugin_type_example

Code

public function calories() {
    // Retrieve the @calories property from the annotation and return it.
    return (double) $this->pluginDefinition['calories'];
}