entity_generic-8.x-3.x-dev/src/Generic/EntityStatusInterface.php
src/Generic/EntityStatusInterface.php
<?php namespace Drupal\entity_generic\Generic; /** * Defines an interface for statuses. */ interface EntityStatusInterface { /** * Denotes that the entity is disabled. */ const ENTITY_DISABLED = 0; /** * Denotes that the entity is enabled. */ const ENTITY_ENABLED = 1; /** * Returns the entity status. * * @return bool * TRUE if the entity is active. */ public function isActive(); /** * Gets the entity status. * * @return bool * TRUE if the entity is active. */ public function getStatus(); /** * Sets the status of an entity. * * @param bool $status * TRUE to set this entity to active, FALSE to set it to inactive. * * @return \Drupal\Core\Entity\EntityInterface * The called entity. */ public function setStatus($status); }