Random::string

public Random::string($length = 8, $unique = FALSE, $validator = NULL) Generates a random string of ASCII characters of codes 32 to 126. The generated string includes alpha-numeric characters and common miscellaneous characters. Use this method when testing general input where the content is not restricted. Parameters int $length: Length of random string to generate. bool $unique: (optional) If TRUE ensures that the random string returned is unique. Defaults to FALSE. callable $validator: (opt

LocalStream::dir_closedir

public LocalStream::dir_closedir() Support for closedir(). Return value bool TRUE on success. Overrides PhpStreamWrapperInterface::dir_closedir See also http://php.net/manual/streamwrapper.dir-closedir.php File core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 564 Class LocalStream Defines a Drupal stream wrapper base class for local files. Namespace Drupal\Core\StreamWrapper Code public function dir_closedir() { closedir($this->handle); // We do not really have a way t

EntityConstraintViolationList::getByFields

public EntityConstraintViolationList::getByFields(array $field_names) Gets the violations of the given fields. When violations should be displayed for a sub-set of visible fields only, this method may be used to filter the set of visible violations first. Parameters string[] $field_names: The names of the fields to get violations for. Return value \Drupal\Core\Entity\EntityConstraintViolationListInterface A list of violations of the given fields. Overrides EntityConstraintViolationListInterfa

FileStorage::readMultiple

public FileStorage::readMultiple(array $names) Reads configuration data from the storage. Parameters array $names: List of names of the configuration objects to load. Return value array A list of the configuration data stored for the configuration object name that could be loaded for the passed list of names. Overrides StorageInterface::readMultiple File core/lib/Drupal/Core/Config/FileStorage.php, line 127 Class FileStorage Defines the file storage. Namespace Drupal\Core\Config Code

ImageFactory::getSupportedExtensions

public ImageFactory::getSupportedExtensions($toolkit_id = NULL) Returns the image file extensions supported by the toolkit. Parameters string|null $toolkit_id: (optional) The ID of the image toolkit to use for checking, or NULL to use the current toolkit. Return value array An array of supported image file extensions (e.g. png/jpeg/gif). See also \Drupal\Core\ImageToolkit\ImageToolkitInterface::getSupportedExtensions() File core/lib/Drupal/Core/Image/ImageFactory.php, line 100 Class Imag

DataReferenceBase::getTarget

public DataReferenceBase::getTarget() Gets the referenced data. Return value \Drupal\Core\TypedData\TypedDataInterface|null The referenced typed data object, or NULL if the reference is unset. Overrides DataReferenceInterface::getTarget File core/lib/Drupal/Core/TypedData/DataReferenceBase.php, line 29 Class DataReferenceBase Base class for typed data references. Namespace Drupal\Core\TypedData Code public function getTarget() { return $this->target; }

UseCacheBackendTrait::cacheSet

protected UseCacheBackendTrait::cacheSet($cid, $data, $expire = Cache::PERMANENT, array $tags = []) Stores data in the persistent cache, respecting the use caches flag. Parameters string $cid: The cache ID of the data to store. mixed $data: The data to store in the cache. Some storage engines only allow objects up to a maximum of 1MB in size to be stored by default. When caching large arrays or similar, take care to ensure $data does not exceed this size. int $expire: One of the following valu

Diff::getEdits

public Diff::getEdits() Gets the list of differences as an array of diff operations. Return value \Drupal\Component\Diff\Engine\DiffOp[] The list of differences as an array of diff operations. File core/lib/Drupal/Component/Diff/Diff.php, line 168 Class Diff Class representing a 'diff' between two sequences of strings. @todo document @subpackage DifferenceEngine Namespace Drupal\Component\Diff Code public function getEdits() { return $this->edits; }

StringLoader::getSource

public StringLoader::getSource($name) Gets the source code of a template, given its name. Parameters string $name The name of the template to load: Return value string The template source code Throws Twig_Error_Loader When $name is not found Overrides Twig_LoaderInterface::getSource File core/lib/Drupal/Core/Template/Loader/StringLoader.php, line 40 Class StringLoader Loads string templates, also known as inline templates. Namespace Drupal\Core\Template\Loader Code public function g

AttachmentsTrait::getAttachments

public AttachmentsTrait::getAttachments() Gets attachments. Return value array The attachments. Overrides AttachmentsInterface::getAttachments File core/lib/Drupal/Core/Render/AttachmentsTrait.php, line 22 Class AttachmentsTrait Provides an implementation of AttachmentsInterface. Namespace Drupal\Core\Render Code public function getAttachments() { return $this->attachments; }