You are here

class Breakpoint in Breakpoints 8

Defines the Breakpoint entity.

Hierarchy

Expanded class hierarchy of Breakpoint

8 files declare their use of Breakpoint
breakpoint.module in ./breakpoint.module
Manage breakpoints and breakpoint groups for responsive designs.
BreakpointAPITest.php in lib/Drupal/breakpoint/Tests/BreakpointAPITest.php
Definition of Drupal\breakpoint\Tests\BreakpointAPITest.
BreakpointCrudTest.php in lib/Drupal/breakpoint/Tests/BreakpointCrudTest.php
Definition of Drupal\breakpoint\Tests\BreakpointCrudTest.
BreakpointGroupAPITest.php in lib/Drupal/breakpoint/Tests/BreakpointGroupAPITest.php
Definition of Drupal\breakpoint\Tests\BreakpointGroupAPITest.
BreakpointGroupCrudTest.php in lib/Drupal/breakpoint/Tests/BreakpointGroupCrudTest.php
Definition of Drupal\breakpoint\Tests\BreakpointGroupCrudTest.

... See full list

7 string references to 'Breakpoint'
BreakpointAPITest::getInfo in lib/Drupal/breakpoint/Tests/BreakpointAPITest.php
Drupal\simpletest\WebTestBase\getInfo().
BreakpointCrudTest::getInfo in lib/Drupal/breakpoint/Tests/BreakpointCrudTest.php
Drupal\simpletest\WebTestBase\getInfo().
BreakpointGroupAPITest::getInfo in lib/Drupal/breakpoint/Tests/BreakpointGroupAPITest.php
Drupal\simpletest\WebTestBase\getInfo().
BreakpointGroupCrudTest::getInfo in lib/Drupal/breakpoint/Tests/BreakpointGroupCrudTest.php
Drupal\simpletest\WebTestBase\getInfo().
BreakpointMediaQueryTest::getInfo in lib/Drupal/breakpoint/Tests/BreakpointMediaQueryTest.php
Drupal\simpletest\WebTestBase\getInfo().

... See full list

File

lib/Drupal/breakpoint/Breakpoint.php, line 20
Definition of Drupal\breakpoint\Breakpoint.

Namespace

Drupal\breakpoint
View source
class Breakpoint extends ConfigEntityBase {

  /**
   * Denotes that a breakpoint or breakpoint group is defined by a theme.
   */
  const SOURCE_TYPE_THEME = 'theme';

  /**
   * Denotes that a breakpoint or breakpoint group is defined by a module.
   */
  const SOURCE_TYPE_MODULE = 'module';

  /**
   * Denotes that a breakpoint or breakpoint group is defined by the user.
   */
  const SOURCE_TYPE_CUSTOM = 'custom';

  /**
   * The breakpoint ID (config name).
   *
   * @var string
   */
  public $id;

  /**
   * The breakpoint UUID.
   *
   * @var string
   */
  public $uuid;

  /**
   * The breakpoint name (machine name).
   *
   * @var string
   */
  public $name;

  /**
   * The breakpoint label.
   *
   * @var string
   */
  public $label;

  /**
   * The breakpoint media query.
   *
   * @var string
   */
  public $mediaQuery = '';

  /**
   * The original media query.
   *
   * This is used to store the original media query as defined by the theme or
   * module, so reverting the breakpoint can be done without reloading
   * everything from the theme/module yaml files.
   *
   * @var string
   */
  public $originalMediaQuery = '';

  /**
   * The breakpoint source.
   *
   * @var string
   */
  public $source = 'user';

  /**
   * The breakpoint source type.
   *
   * @var string
   *   Allowed values:
   *     Breakpoint::SOURCE_TYPE_THEME
   *     Breakpoint::SOURCE_TYPE_MODULE
   *     Breakpoint::SOURCE_TYPE_CUSTOM
   */
  public $sourceType = Breakpoint::SOURCE_TYPE_CUSTOM;

  /**
   * The breakpoint status.
   *
   * @var string
   */
  public $status = TRUE;

  /**
   * The breakpoint weight.
   *
   * @var weight
   */
  public $weight = 0;

  /**
   * The breakpoint multipliers.
   *
   * @var multipliers
   */
  public $multipliers = array();

  /**
   * The breakpoint overridden status.
   *
   * @var boolean
   */
  public $overridden = FALSE;

  /**
   * Overrides Drupal\config\ConfigEntityBase::__construct().
   */
  public function __construct(array $values = array(), $entity_type = 'breakpoint') {
    parent::__construct($values, $entity_type);
  }

  /**
   * Overrides Drupal\config\ConfigEntityBase::save().
   */
  public function save() {
    if (empty($this->id)) {
      $this->id = $this
        ->getConfigName();
    }
    if (empty($this->label)) {
      $this->label = drupal_ucfirst($this->name);
    }

    // Check if everything is valid.
    if (!$this
      ->isValid()) {
      throw new InvalidBreakpointException('Invalid data detected.');
    }

    // Remove ununsed multipliers.
    $this->multipliers = array_filter($this->multipliers);

    // Always add '1x' multiplier.
    if (!array_key_exists('1x', $this->multipliers)) {
      $this->multipliers = array(
        '1x' => '1x',
      ) + $this->multipliers;
    }
    return parent::save();
  }

  /**
   * Get config name.
   *
   * @return string
   */
  public function getConfigName() {
    return $this->sourceType . '.' . $this->source . '.' . $this->name;
  }

  /**
   * Override a breakpoint and save it.
   *
   * @return Drupal\breakpoint\Breakpoint|false
   */
  public function override() {

    // Custom breakpoint can't be overridden.
    if ($this->overridden || $this->sourceType === Breakpoint::SOURCE_TYPE_CUSTOM) {
      return FALSE;
    }

    // Mark breakpoint as overridden.
    $this->overridden = TRUE;
    $this->originalMediaQuery = $this->mediaQuery;
    $this
      ->save();
    return $this;
  }

  /**
   * Revert a breakpoint and save it.
   *
   * @return Drupal\breakpoint\Breakpoint|false
   */
  public function revert() {
    if (!$this->overridden || $this->sourceType === Breakpoint::SOURCE_TYPE_CUSTOM) {
      return FALSE;
    }
    $this->overridden = FALSE;
    $this->mediaQuery = $this->originalMediaQuery;
    $this
      ->save();
    return $this;
  }

  /**
   * Duplicate a breakpoint.
   *
   * The new breakpoint inherits the media query.
   *
   * @return Drupal\breakpoint\Breakpoint
   */
  public function duplicate() {
    return entity_create('breakpoint', array(
      'mediaQuery' => $this->mediaQuery,
    ));
  }

  /**
   * Shortcut function to enable a breakpoint and save it.
   *
   * @see breakpoint_action_confirm_submit()
   */
  public function enable() {
    if (!$this->status) {
      $this->status = TRUE;
      $this
        ->save();
    }
  }

  /**
   * Shortcut function to disable a breakpoint and save it.
   *
   * @see breakpoint_action_confirm_submit()
   */
  public function disable() {
    if ($this->status) {
      $this->status = FALSE;
      $this
        ->save();
    }
  }

  /**
   * Check if the breakpoint is valid.
   *
   * @throws Drupal\breakpoint\InvalidBreakpointSourceTypeException
   * @throws Drupal\breakpoint\InvalidBreakpointSourceException
   * @throws Drupal\breakpoint\InvalidBreakpointNameException
   * @throws Drupal\breakpoint\InvalidBreakpointMediaQueryException
   *
   * @see isValidMediaQuery()
   */
  public function isValid() {

    // Check for illegal values in breakpoint source type.
    if (!in_array($this->sourceType, array(
      Breakpoint::SOURCE_TYPE_CUSTOM,
      Breakpoint::SOURCE_TYPE_MODULE,
      Breakpoint::SOURCE_TYPE_THEME,
    ))) {
      throw new InvalidBreakpointSourceTypeException(format_string('Invalid source type @source_type', array(
        '@source_type' => $this->sourceType,
      )));
    }

    // Check for illegal characters in breakpoint source.
    if (preg_match('/[^a-z_]+/', $this->source)) {
      throw new InvalidBreakpointSourceException(format_string("Invalid value '@source' for breakpoint source property. Breakpoint source property can only contain lowercase letters and underscores.", array(
        '@source' => $this->source,
      )));
    }

    // Check for illegal characters in breakpoint names.
    if (preg_match('/[^0-9a-z_\\-]/', $this->name)) {
      throw new InvalidBreakpointNameException(format_string("Invalid value '@name' for breakpoint name property. Breakpoint name property can only contain lowercase alphanumeric characters, underscores (_), and hyphens (-).", array(
        '@name' => $this->name,
      )));
    }
    return $this::isValidMediaQuery($this->mediaQuery);
  }

  /**
   * Is the breakpoint editable.
   *
   * @return boolean
   */
  public function isEditable() {

    // Custom breakpoints are always editable.
    if ($this->sourceType == Breakpoint::SOURCE_TYPE_CUSTOM) {
      return TRUE;
    }

    // Overridden breakpoints are editable.
    if ($this->overridden) {
      return TRUE;
    }
    return FALSE;
  }

  /**
   * Check if a mediaQuery is valid.
   *
   * @throws Drupal\breakpoint\InvalidBreakpointMediaQueryException
   *
   * @return true
   *
   * @see http://www.w3.org/TR/css3-mediaqueries/
   * @see http://www.w3.org/Style/CSS/Test/MediaQueries/20120229/reports/implement-report.html
   * @see https://github.com/adobe/webkit/blob/master/Source/WebCore/css/
   */
  public static function isValidMediaQuery($media_query) {
    $media_features = array(
      'width' => 'length',
      'min-width' => 'length',
      'max-width' => 'length',
      'height' => 'length',
      'min-height' => 'length',
      'max-height' => 'length',
      'device-width' => 'length',
      'min-device-width' => 'length',
      'max-device-width' => 'length',
      'device-height' => 'length',
      'min-device-height' => 'length',
      'max-device-height' => 'length',
      'orientation' => array(
        'portrait',
        'landscape',
      ),
      'aspect-ratio' => 'ratio',
      'min-aspect-ratio' => 'ratio',
      'max-aspect-ratio' => 'ratio',
      'device-aspect-ratio' => 'ratio',
      'min-device-aspect-ratio' => 'ratio',
      'max-device-aspect-ratio' => 'ratio',
      'color' => 'integer',
      'min-color' => 'integer',
      'max-color' => 'integer',
      'color-index' => 'integer',
      'min-color-index' => 'integer',
      'max-color-index' => 'integer',
      'monochrome' => 'integer',
      'min-monochrome' => 'integer',
      'max-monochrome' => 'integer',
      'resolution' => 'resolution',
      'min-resolution' => 'resolution',
      'max-resolution' => 'resolution',
      'scan' => array(
        'progressive',
        'interlace',
      ),
      'grid' => 'integer',
    );
    if ($media_query) {

      // Strip new lines and trim.
      $media_query = str_replace(array(
        "\r",
        "\n",
      ), ' ', trim($media_query));

      // Remove comments /* ... */.
      $media_query = preg_replace('/\\/\\*[\\s\\S]*?\\*\\//', '', $media_query);

      // Check mediaQuery_list: S* [mediaQuery [ ',' S* mediaQuery ]* ]?
      $parts = explode(',', $media_query);
      foreach ($parts as $part) {

        // Split on ' and '
        $query_parts = explode(' and ', trim($part));
        $media_type_found = FALSE;
        foreach ($query_parts as $query_part) {
          $matches = array();

          // Check expression: '(' S* media_feature S* [ ':' S* expr ]? ')' S*
          if (preg_match('/^\\(([\\w\\-]+)(:\\s?([\\w\\-\\.]+))?\\)/', trim($query_part), $matches)) {

            // Single expression.
            if (isset($matches[1]) && !isset($matches[2])) {
              if (!array_key_exists($matches[1], $media_features)) {
                throw new InvalidBreakpointMediaQueryException('Invalid media feature detected.');
              }
            }
            elseif (isset($matches[3]) && !isset($matches[4])) {
              $value = trim($matches[3]);
              if (!array_key_exists($matches[1], $media_features)) {
                throw new InvalidBreakpointMediaQueryException('Invalid media feature detected.');
              }
              if (is_array($media_features[$matches[1]])) {

                // Check if value is allowed.
                if (!array_key_exists($value, $media_features[$matches[1]])) {
                  throw new InvalidBreakpointMediaQueryException('Value is not allowed.');
                }
              }
              else {
                switch ($media_features[$matches[1]]) {
                  case 'length':
                    $length_matches = array();
                    if (preg_match('/^(\\-)?(\\d+(?:\\.\\d+)?)?((?:|em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|dpi|dpcm))$/i', trim($value), $length_matches)) {

                      // Only -0 is allowed.
                      if ($length_matches[1] === '-' && $length_matches[2] !== '0') {
                        throw new InvalidBreakpointMediaQueryException('Invalid length detected.');
                      }

                      // If there's a unit, a number is needed as well.
                      if ($length_matches[2] === '' && $length_matches[3] !== '') {
                        throw new InvalidBreakpointMediaQueryException('Unit found, value is missing.');
                      }
                    }
                    else {
                      throw new InvalidBreakpointMediaQueryException('Invalid unit detected.');
                    }
                    break;
                }
              }
            }
          }
          elseif (preg_match('/^((?:only|not)?\\s?)([\\w\\-]+)$/i', trim($query_part), $matches)) {
            if ($media_type_found) {
              throw new InvalidBreakpointMediaQueryException('Only one media type is allowed.');
            }
            $media_type_found = TRUE;
          }
          else {
            throw new InvalidBreakpointMediaQueryException('Invalid media query detected.');
          }
        }
      }
      return TRUE;
    }
    throw new InvalidBreakpointMediaQueryException('Media query is empty.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Breakpoint::$id public property The breakpoint ID (config name).
Breakpoint::$label public property The breakpoint label.
Breakpoint::$mediaQuery public property The breakpoint media query.
Breakpoint::$multipliers public property The breakpoint multipliers.
Breakpoint::$name public property The breakpoint name (machine name).
Breakpoint::$originalMediaQuery public property The original media query.
Breakpoint::$overridden public property The breakpoint overridden status.
Breakpoint::$source public property The breakpoint source.
Breakpoint::$sourceType public property The breakpoint source type.
Breakpoint::$status public property The breakpoint status. Overrides ConfigEntityBase::$status
Breakpoint::$uuid public property The breakpoint UUID. Overrides ConfigEntityBase::$uuid
Breakpoint::$weight public property The breakpoint weight.
Breakpoint::disable public function Shortcut function to disable a breakpoint and save it. Overrides ConfigEntityBase::disable
Breakpoint::duplicate public function Duplicate a breakpoint.
Breakpoint::enable public function Shortcut function to enable a breakpoint and save it. Overrides ConfigEntityBase::enable
Breakpoint::getConfigName public function Get config name.
Breakpoint::isEditable public function Is the breakpoint editable.
Breakpoint::isValid public function Check if the breakpoint is valid.
Breakpoint::isValidMediaQuery public static function Check if a mediaQuery is valid.
Breakpoint::override public function Override a breakpoint and save it.
Breakpoint::revert public function Revert a breakpoint and save it.
Breakpoint::save public function Overrides Drupal\config\ConfigEntityBase::save(). Overrides ConfigEntityBase::save
Breakpoint::SOURCE_TYPE_CUSTOM constant Denotes that a breakpoint or breakpoint group is defined by the user.
Breakpoint::SOURCE_TYPE_MODULE constant Denotes that a breakpoint or breakpoint group is defined by a module.
Breakpoint::SOURCE_TYPE_THEME constant Denotes that a breakpoint or breakpoint group is defined by a theme.
Breakpoint::__construct public function Overrides Drupal\config\ConfigEntityBase::__construct(). Overrides ConfigEntityBase::__construct
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
ConfigEntityBase::$isUninstalling private property Whether the config is being deleted by the uninstall process.
ConfigEntityBase::$langcode protected property The language code of the entity's default language.
ConfigEntityBase::$originalId protected property The original ID of the configuration entity.
ConfigEntityBase::$third_party_settings protected property Third party entity settings.
ConfigEntityBase::$trustedData protected property Trust supplied data and not use configuration schema on save.
ConfigEntityBase::$_core protected property Information maintained by Drupal core about configuration.
ConfigEntityBase::addDependency protected function Overrides \Drupal\Core\Entity\DependencyTrait:addDependency().
ConfigEntityBase::calculateDependencies public function Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityInterface::calculateDependencies 13
ConfigEntityBase::createDuplicate public function Creates a duplicate of the entity. Overrides EntityBase::createDuplicate 1
ConfigEntityBase::get public function Returns the value of a property. Overrides ConfigEntityInterface::get
ConfigEntityBase::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. Overrides EntityBase::getCacheTagsToInvalidate 1
ConfigEntityBase::getConfigDependencyName public function Gets the configuration dependency name. Overrides EntityBase::getConfigDependencyName
ConfigEntityBase::getConfigManager protected static function Gets the configuration manager.
ConfigEntityBase::getConfigTarget public function Gets the configuration target identifier for the entity. Overrides EntityBase::getConfigTarget
ConfigEntityBase::getDependencies public function Gets the configuration dependencies. Overrides ConfigEntityInterface::getDependencies
ConfigEntityBase::getOriginalId public function Gets the original ID. Overrides EntityBase::getOriginalId
ConfigEntityBase::getThirdPartyProviders public function Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface::getThirdPartyProviders
ConfigEntityBase::getThirdPartySetting public function Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface::getThirdPartySetting
ConfigEntityBase::getThirdPartySettings public function Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface::getThirdPartySettings
ConfigEntityBase::getTypedConfig protected function Gets the typed config manager.
ConfigEntityBase::hasTrustedData public function Gets whether on not the data is trusted. Overrides ConfigEntityInterface::hasTrustedData
ConfigEntityBase::invalidateTagsOnDelete protected static function Override to never invalidate the individual entities' cache tags; the config system already invalidates them. Overrides EntityBase::invalidateTagsOnDelete
ConfigEntityBase::invalidateTagsOnSave protected function Override to never invalidate the entity's cache tag; the config system already invalidates it. Overrides EntityBase::invalidateTagsOnSave
ConfigEntityBase::isInstallable public function Checks whether this entity is installable. Overrides ConfigEntityInterface::isInstallable 2
ConfigEntityBase::isNew public function Overrides Entity::isNew(). Overrides EntityBase::isNew
ConfigEntityBase::isUninstalling public function Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface::isUninstalling
ConfigEntityBase::link public function Deprecated way of generating a link to the entity. See toLink(). Overrides EntityBase::link
ConfigEntityBase::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityInterface::onDependencyRemoval 7
ConfigEntityBase::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. Overrides EntityBase::preDelete 8
ConfigEntityBase::preSave public function Acts on an entity before the presave hook is invoked. Overrides EntityBase::preSave 13
ConfigEntityBase::set public function Sets the value of a property. Overrides ConfigEntityInterface::set
ConfigEntityBase::setOriginalId public function Sets the original ID. Overrides EntityBase::setOriginalId
ConfigEntityBase::setStatus public function Sets the status of the configuration entity. Overrides ConfigEntityInterface::setStatus
ConfigEntityBase::setThirdPartySetting public function Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface::setThirdPartySetting
ConfigEntityBase::setUninstalling public function
ConfigEntityBase::sort public static function Helper callback for uasort() to sort configuration entities by weight and label. 6
ConfigEntityBase::status public function Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface::status 4
ConfigEntityBase::toArray public function Gets an array of all property values. Overrides EntityBase::toArray 2
ConfigEntityBase::toUrl public function Gets the URL object for the entity. Overrides EntityBase::toUrl
ConfigEntityBase::trustData public function Sets that the data should be trusted. Overrides ConfigEntityInterface::trustData
ConfigEntityBase::unsetThirdPartySetting public function Unsets a third-party setting. Overrides ThirdPartySettingsInterface::unsetThirdPartySetting
ConfigEntityBase::url public function Gets the public URL for this entity. Overrides EntityBase::url
ConfigEntityBase::urlInfo public function Gets the URL object for the entity. Overrides EntityBase::urlInfo
ConfigEntityBase::__sleep public function Overrides EntityBase::__sleep 4
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function Aliased as: traitSleep 1
DependencySerializationTrait::__wakeup public function 2
DependencyTrait::$dependencies protected property The object's dependencies.
DependencyTrait::addDependencies protected function Adds multiple dependencies.
DependencyTrait::addDependency protected function Adds a dependency. Aliased as: addDependencyTrait
EntityBase::$enforceIsNew protected property Boolean indicating whether the entity should be forced to be new.
EntityBase::$entityTypeId protected property The entity type.
EntityBase::$typedData protected property A typed data object wrapping this entity.
EntityBase::access public function Checks data value access. Overrides AccessibleInterface::access 1
EntityBase::bundle public function Gets the bundle of the entity. Overrides EntityInterface::bundle 1
EntityBase::create public static function Constructs a new entity object, without permanently saving it. Overrides EntityInterface::create
EntityBase::delete public function Deletes an entity permanently. Overrides EntityInterface::delete 2
EntityBase::enforceIsNew public function Enforces an entity to be new. Overrides EntityInterface::enforceIsNew
EntityBase::entityManager Deprecated protected function Gets the entity manager.
EntityBase::entityTypeBundleInfo protected function Gets the entity type bundle info service.
EntityBase::entityTypeManager protected function Gets the entity type manager.
EntityBase::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyTrait::getCacheContexts
EntityBase::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyTrait::getCacheMaxAge
EntityBase::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyTrait::getCacheTags
EntityBase::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. Overrides EntityInterface::getConfigDependencyKey
EntityBase::getEntityType public function Gets the entity type definition. Overrides EntityInterface::getEntityType
EntityBase::getEntityTypeId public function Gets the ID of the type of the entity. Overrides EntityInterface::getEntityTypeId
EntityBase::getListCacheTagsToInvalidate protected function The list cache tags to invalidate for this entity.
EntityBase::getTypedData public function Gets a typed data object for this entity object. Overrides EntityInterface::getTypedData
EntityBase::hasLinkTemplate public function Indicates if a link template exists for a given key. Overrides EntityInterface::hasLinkTemplate
EntityBase::id public function Gets the identifier. Overrides EntityInterface::id 11
EntityBase::label public function Gets the label of the entity. Overrides EntityInterface::label 6
EntityBase::language public function Gets the language of the entity. Overrides EntityInterface::language 1
EntityBase::languageManager protected function Gets the language manager.
EntityBase::linkTemplates protected function Gets an array link templates. 1
EntityBase::load public static function Loads an entity. Overrides EntityInterface::load
EntityBase::loadMultiple public static function Loads one or more entities. Overrides EntityInterface::loadMultiple
EntityBase::postCreate public function Acts on a created entity before hooks are invoked. Overrides EntityInterface::postCreate 4
EntityBase::postDelete public static function Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface::postDelete 16
EntityBase::postLoad public static function Acts on loaded entities. Overrides EntityInterface::postLoad 2
EntityBase::postSave public function Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface::postSave 14
EntityBase::preCreate public static function Changes the values of an entity before it is created. Overrides EntityInterface::preCreate 5
EntityBase::referencedEntities public function Gets a list of entities referenced by this entity. Overrides EntityInterface::referencedEntities 1
EntityBase::toLink public function Generates the HTML for a link to this entity. Overrides EntityInterface::toLink
EntityBase::uriRelationships public function Gets a list of URI relationships supported by this entity. Overrides EntityInterface::uriRelationships
EntityBase::urlRouteParameters protected function Gets an array of placeholders for this entity. 2
EntityBase::uuid public function Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface::uuid 1
EntityBase::uuidGenerator protected function Gets the UUID generator.
PluginDependencyTrait::calculatePluginDependencies protected function Calculates and adds dependencies of a specific plugin instance. 1
PluginDependencyTrait::getPluginDependencies protected function Calculates and returns dependencies of a specific plugin instance.
PluginDependencyTrait::moduleHandler protected function Wraps the module handler. 1
PluginDependencyTrait::themeHandler protected function Wraps the theme handler. 1
RefinableCacheableDependencyTrait::addCacheableDependency public function 1
RefinableCacheableDependencyTrait::addCacheContexts public function
RefinableCacheableDependencyTrait::addCacheTags public function
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function
SynchronizableEntityTrait::$isSyncing protected property Whether this entity is being created, updated or deleted through a synchronization process.
SynchronizableEntityTrait::isSyncing public function
SynchronizableEntityTrait::setSyncing public function