Cache::getBins

public static Cache::getBins() Gets all cache bin services. Return value \Drupal\Core\Cache\CacheBackendInterface[] An array of cache backend objects keyed by cache bins. File core/lib/Drupal/Core/Cache/Cache.php, line 154 Class Cache Helper methods for cache. Namespace Drupal\Core\Cache Code public static function getBins() { $bins = array(); $container = \Drupal::getContainer(); foreach ($container->getParameter('cache_bins') as $service_id => $bin) { $bins[$bin] = $

Cache::buildTags

public static Cache::buildTags($prefix, array $suffixes, $glue = ':') Build an array of cache tags from a given prefix and an array of suffixes. Each suffix will be converted to a cache tag by appending it to the prefix, with a colon between them. Parameters string $prefix: A prefix string. array $suffixes: An array of suffixes. Will be cast to strings. string $glue: A string to be used as glue for concatenation. Defaults to a colon. Return value string[] An array of cache tags. File core/lib

Cache API

Information about the Drupal Cache API Basics Note: If not specified, all of the methods mentioned here belong to \Drupal\Core\Cache\CacheBackendInterface. The Cache API is used to store data that takes a long time to compute. Caching can either be permanent or valid only for a certain timespan, and the cache can contain any type of data. To use the Cache API: Request a cache object through \Drupal::cache() or by injecting a cache service. Define a Cache ID (cid) value for your data. A cid is a

Cache

Helper methods for cache. Hierarchy class \Drupal\Core\Cache\Cache Related topics Cache API Information about the Drupal Cache API File core/lib/Drupal/Core/Cache/Cache.php, line 12 Namespace Drupal\Core\Cache Members Name Modifiers Type Description Cache::buildTags public static function Build an array of cache tags from a given prefix and an array of suffixes. Cache::getBins public static function Gets all cache bin services. Cache::invalidateTags public

Bytes::toInt

public static Bytes::toInt($size) Parses a given byte size. Parameters mixed $size: An integer or string size expressed as a number of bytes with optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8 bytes, 9mbytes). Return value int An integer representation of the size in bytes. File core/lib/Drupal/Component/Utility/Bytes.php, line 27 Class Bytes Provides helper methods for byte conversions. Namespace Drupal\Component\Utility Code public static function toInt($size)

Bytes::KILOBYTE

The number of bytes in a kilobyte. See also http://wikipedia.org/wiki/Kilobyte File core/lib/Drupal/Component/Utility/Bytes.php, line 15 Class Bytes Provides helper methods for byte conversions. Namespace Drupal\Component\Utility Code const KILOBYTE = 1024;

Bytes

Provides helper methods for byte conversions. Hierarchy class \Drupal\Component\Utility\Bytes File core/lib/Drupal/Component/Utility/Bytes.php, line 8 Namespace Drupal\Component\Utility Members Name Modifiers Type Description Bytes::KILOBYTE constant The number of bytes in a kilobyte. Bytes::toInt public static function Parses a given byte size.

Button::processButton

public static Button::processButton(&$element, FormStateInterface $form_state, &$complete_form) Processes a form button element. File core/lib/Drupal/Core/Render/Element/Button.php, line 60 Class Button Provides an action button form element. Namespace Drupal\Core\Render\Element Code public static function processButton(&$element, FormStateInterface $form_state, &$complete_form) { // If this is a button intentionally allowing incomplete form submission // (e.g., a "

Button::preRenderButton

public static Button::preRenderButton($element) Prepares a #type 'button' render element for input.html.twig. Parameters array $element: An associative array containing the properties of the element. Properties used: #attributes, #button_type, #name, #value. The #button_type property accepts any value, though core themes have CSS that styles the following button_types appropriately: 'primary', 'danger'. Return value array The $element with prepared variables ready for input.html.twig. File co

Button::getInfo

public Button::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Button.php, line 38 Class Button Provides an action button form element. Namespace Drupal\Core\Render\Element Code public function ge