RefinableCacheableDependencyTrait::$cacheMaxAge

Cache max-age. Type: int File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 29 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code protected $cacheMaxAge = Cache::PERMANENT;

FieldConfig::preSave

public FieldConfig::preSave(EntityStorageInterface $storage) Overrides \Drupal\Core\Entity\Entity::preSave(). Throws \Drupal\Core\Field\FieldException If the field definition is invalid. \Drupal\Core\Entity\EntityStorageException In case of failures at the configuration storage level. Overrides ConfigEntityBase::preSave File core/modules/field/src/Entity/FieldConfig.php, line 143 Class FieldConfig Defines the Field entity. Namespace Drupal\field\Entity Code public function preSave(Ent

ContentEntityBase::isValidationRequired

public ContentEntityBase::isValidationRequired() Checks whether entity validation is required before saving the entity. Return value bool TRUE if validation is required, FALSE if not. Overrides FieldableEntityInterface::isValidationRequired File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 380 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code public function isValidationRequired() { return (boo

_filter_url_trim

_filter_url_trim($text, $length = NULL) Shortens long URLs to http://www.example.com/long/url… Related topics Standard filters Filters implemented by the Filter module. File core/modules/filter/filter.module, line 675 Framework for handling the filtering of content. Code function _filter_url_trim($text, $length = NULL) { static $_length; if ($length !== NULL) { $_length = $length; } if (isset($_length)) { $text = Unicode::truncate($text, $_length, FALSE, TRUE); } retur

Html::escapeCdataElement

public static Html::escapeCdataElement(\DOMNode $node, $comment_start = '//', $comment_end = '') Adds comments around a <!CDATA section in a \DOMNode. \DOMDocument::loadHTML() in \Drupal\Component\Utility\Html::load() makes CDATA sections from the contents of inline script and style tags. This can cause HTML4 browsers to throw exceptions. This function attempts to solve the problem by creating a \DOMDocumentFragment to comment the CDATA tag. Parameters \DOMNode $node: The element potentiall

ShortcutForm::$entity

The entity being used by this form. Type: \Drupal\shortcut\ShortcutInterface Overrides EntityForm::$entity File core/modules/shortcut/src/ShortcutForm.php, line 18 Class ShortcutForm Form handler for the shortcut entity forms. Namespace Drupal\shortcut Code protected $entity;

ItemInterface::getAuthor

public ItemInterface::getAuthor() Returns the author of the feed item. Return value string The author of the feed item. File core/modules/aggregator/src/ItemInterface.php, line 75 Class ItemInterface Provides an interface defining an aggregator item entity. Namespace Drupal\aggregator Code public function getAuthor();

Color

Performs color conversions. Hierarchy class \Drupal\Component\Utility\Color File core/lib/Drupal/Component/Utility/Color.php, line 8 Namespace Drupal\Component\Utility Members Name Modifiers Type Description Color::hexToRgb public static function Parses a hexadecimal color string like '#abc' or '#aabbcc'. Color::rgbToHex public static function Converts RGB color arrays and RGB strings in CSS notation to lowercase simple colors like '#aabbcc'. Color::validateHex

Image::scaleAndCrop

public Image::scaleAndCrop($width, $height) Scales an image to the exact width and height given. This function achieves the target aspect ratio by cropping the original image equally on both sides, or equally on the top and bottom. This function is useful to create uniform sized avatars from larger images. The resulting image always has the exact target dimensions. Parameters int $width: The target width, in pixels. int $height: The target height, in pixels. Return value bool TRUE on success,

LocaleLookup::getCid

protected LocaleLookup::getCid() Gets the cache ID. Return value string Overrides CacheCollector::getCid File core/modules/locale/src/LocaleLookup.php, line 109 Class LocaleLookup A cache collector to allow for dynamic building of the locale cache. Namespace Drupal\locale Code protected function getCid() { if (!isset($this->cid)) { // Add the current user's role IDs to the cache key, this ensures that, // for example, strings for admin menu items and settings forms are no