You are here

public function EntityAliasTypeBase::applies in View Mode Page 8.3

Same name and namespace in other branches
  1. 4.0.x src/Plugin/view_mode_page/AliasType/EntityAliasTypeBase.php \Drupal\view_mode_page\Plugin\view_mode_page\AliasType\EntityAliasTypeBase::applies()
  2. 3.2.x src/Plugin/view_mode_page/AliasType/EntityAliasTypeBase.php \Drupal\view_mode_page\Plugin\view_mode_page\AliasType\EntityAliasTypeBase::applies()

Determines if this plugin type can apply a given object.

Parameters

object $object: The object used to determine if this plugin can apply.

Return value

bool Whether this plugin applies to the given object.

Overrides AliasTypeInterface::applies

File

src/Plugin/view_mode_page/AliasType/EntityAliasTypeBase.php, line 122

Class

EntityAliasTypeBase
A view_mode_page alias type plugin for entities with canonical links.

Namespace

Drupal\view_mode_page\Plugin\view_mode_page\AliasType

Code

public function applies($object) {
  return $object instanceof FieldableEntityInterface && $object
    ->getEntityTypeId() == $this
    ->getEntityTypeId();
}