PluralFormulaInterface::getFormula

public PluralFormulaInterface::getFormula($langcode) Gets the plural formula for a langcode. Parameters string $langcode: The language code to get the formula for. Return value array An array of formulae. File core/modules/locale/src/PluralFormulaInterface.php, line 44 Class PluralFormulaInterface An interface for a service providing plural formulae. Namespace Drupal\locale Code public function getFormula($langcode);

Datelist::incrementRound

protected static Datelist::incrementRound(&$date, $increment) Rounds minutes and seconds to nearest requested value. Parameters $date: $increment: File core/lib/Drupal/Core/Datetime/Element/Datelist.php, line 365 Class Datelist Provides a datelist element. Namespace Drupal\Core\Datetime\Element Code protected static function incrementRound(&$date, $increment) { // Round minutes and seconds, if necessary. if ($date instanceof DrupalDateTime && $increment > 1) {

ProxyServicesPass::process

public ProxyServicesPass::process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Parameters ContainerBuilder $container: Overrides CompilerPassInterface::process File core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php, line 18 Class ProxyServicesPass Replaces all services with a lazy flag. Namespace Drupal\Core\DependencyInjection\Compiler Code public function process(ContainerBuilder $container) { foreach ($conta

ConfigSingleImportForm::create

public static ConfigSingleImportForm::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The s

EnforcedFormResponseSubscriber::getSubscribedEvents

public static EnforcedFormResponseSubscriber::getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $p

responsive_image_build_source_attributes

responsive_image_build_source_attributes(ImageInterface $image, array $variables, BreakpointInterface $breakpoint, array $multipliers) Helper function for template_preprocess_responsive_image(). Builds an array of attributes for <source> tags to be used in a <picture> tag. In other words, this function provides the attributes for each <source> tag in a <picture> tag. In a responsive image style, each breakpoint has an image style mapping for each of its multipliers. An i

PhpassHashedPassword::hash

public PhpassHashedPassword::hash($password) Hash a password using a secure hash. Parameters string $password: A plain-text password. Return value string A string containing the hashed password, or FALSE on failure. Overrides PasswordInterface::hash File core/lib/Drupal/Core/Password/PhpassHashedPassword.php, line 214 Class PhpassHashedPassword Secure password hashing functions based on the Portable PHP password hashing framework. Namespace Drupal\Core\Password Code public function h

Drupal::cache

public static Drupal::cache($bin = 'default') Returns the requested cache bin. Parameters string $bin: (optional) The cache bin for which the cache object should be returned, defaults to 'default'. Return value \Drupal\Core\Cache\CacheBackendInterface The cache object associated with the specified bin. Related topics Cache API Information about the Drupal Cache API File core/lib/Drupal.php, line 298 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static fu

PhpArrayDumper::supportsMachineFormat

protected PhpArrayDumper::supportsMachineFormat() Whether this supports the machine-optimized format or not. Return value bool TRUE if this supports machine-optimized format, FALSE otherwise. Overrides OptimizedPhpArrayDumper::supportsMachineFormat File core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php, line 68 Class PhpArrayDumper PhpArrayDumper dumps a service container as a PHP array. Namespace Drupal\Component\DependencyInjection\Dumper Code protected functio

FileInterface::setSize

public FileInterface::setSize($size) Sets the size of the file. Parameters int $size: The size of the file in bytes. File core/modules/file/src/FileInterface.php, line 83 Class FileInterface Defines getter and setter methods for file entity base fields. Namespace Drupal\file Code public function setSize($size);