Feed::setImage

public Feed::setImage($image) Sets the primary image attached to the feed. Parameters string $image: An image URL. Return value \Drupal\aggregator\FeedInterface The class instance that this method is called on. Overrides FeedInterface::setImage File core/modules/aggregator/src/Entity/Feed.php, line 360 Class Feed Defines the aggregator feed entity class. Namespace Drupal\aggregator\Entity Code public function setImage($image) { $this->set('image', $image); return $this; }

EntityViewBuilderInterface::view

public EntityViewBuilderInterface::view(EntityInterface $entity, $view_mode = 'full', $langcode = NULL) Builds the render array for the provided entity. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity to render. string $view_mode: (optional) The view mode that should be used to render the entity. string $langcode: (optional) For which language the entity should be rendered, defaults to the current content language. Return value array A render array for the entity. Throws \

User::postSave

public User::postSave(EntityStorageInterface $storage, $update = TRUE) Acts on a saved entity before the insert or update hook is invoked. Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. bool $upda

NullStorage::decode

public NullStorage::decode($raw) Decodes configuration data from the storage-specific format. This is a publicly accessible static method to allow for alternative usages in data conversion scripts and also tests. Parameters string $raw: The raw configuration data string to decode. Return value array The decoded configuration data as an associative array. Overrides StorageInterface::decode File core/lib/Drupal/Core/Config/NullStorage.php, line 73 Class NullStorage Defines a stub storage.

EntityType::$label_singular

The indefinite singular name of the type. Type: string File core/lib/Drupal/Core/Entity/EntityType.php, line 189 Class EntityType Provides an implementation of an entity type and its metadata. Namespace Drupal\Core\Entity Code protected $label_singular = '';

Views::getApplicableViews

public static Views::getApplicableViews($type) Return a list of all view IDs and display IDs that have a particular setting in their display's plugin settings. array( array($view_id, $display_id), array($view_id, $display_id), ); Parameters string $type: A flag from the display plugin definitions (e.g, 'uses_menu_links'). Return value array A list of arrays containing the $view_id and $display_id. File core/modules/views/src/Views.php, line 205 Class Views Static service container w

Datetime::formatExample

public static Datetime::formatExample($format) Creates an example for a date format. This is centralized for a consistent method of creating these examples. Parameters string $format: Return value string File core/lib/Drupal/Core/Datetime/Element/Datetime.php, line 372 Class Datetime Provides a datetime element. Namespace Drupal\Core\Datetime\Element Code public static function formatExample($format) { if (!static::$dateExample) { static::$dateExample = new DrupalDateTime();

ResponsiveImageStyle::getImageStyleIds

public ResponsiveImageStyle::getImageStyleIds() Gets all the image styles IDs involved in the responsive image mapping. Return value string[] Overrides ResponsiveImageStyleInterface::getImageStyleIds File core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php, line 250 Class ResponsiveImageStyle Defines the responsive image style entity. Namespace Drupal\responsive_image\Entity Code public function getImageStyleIds() { $image_styles = [$this->getFallbackImageStyle()];

ConfirmDeleteMultiple::create

public static ConfirmDeleteMultiple::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The se

BaseFieldDefinition::setCardinality

public BaseFieldDefinition::setCardinality($cardinality) Sets the maximum number of items allowed for the field. Possible values are positive integers or FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. Parameters int $cardinality: The field cardinality. Return value $this File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 273 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function setCardinality($cardinality) {