LocalActionDefault::getCacheContexts

public LocalActionDefault::getCacheContexts() The cache contexts associated with this object. These identify a specific variation/representation of the object. Cache contexts are tokens: placeholders that are converted to cache keys by the @cache_contexts_manager service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache. Return value string[] An array of cache context tokens, used to generate a cach

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

RegisterForm::form

public RegisterForm::form(array $form, FormStateInterface $form_state) Gets the actual form array to be built. Overrides AccountForm::form See also \Drupal\Core\Entity\EntityForm::processForm() \Drupal\Core\Entity\EntityForm::afterBuild() File core/modules/user/src/RegisterForm.php, line 15 Class RegisterForm Form handler for the user register forms. Namespace Drupal\user Code public function form(array $form, FormStateInterface $form_state) { $user = $this->currentUser(); /**

Query::getTables

public Query::getTables(SelectInterface $sql_query) Gets the Tables object for this query. Parameters \Drupal\Core\Database\Query\SelectInterface $sql_query: The SQL query object being built. Return value \Drupal\Core\Entity\Query\Sql\TablesInterface The object that adds tables and fields to the SQL query object. File core/lib/Drupal/Core/Entity/Query/Sql/Query.php, line 307 Class Query The SQL storage entity query class. Namespace Drupal\Core\Entity\Query\Sql Code public function ge

system_authorized_init

system_authorized_init($callback, $file, $arguments = array(), $page_title = NULL) Setup a given callback to run via authorize.php with elevated privileges. To use authorize.php, certain variables must be stashed into $_SESSION. This function sets up all the necessary $_SESSION variables. The calling function should then redirect to authorize.php, using the full path returned by system_authorized_get_url(). That initiates the workflow that will eventually lead to the callback being invoked. The

ModulesUninstallConfirmForm::$modules

An array of modules to uninstall. Type: array File core/modules/system/src/Form/ModulesUninstallConfirmForm.php, line 54 Class ModulesUninstallConfirmForm Builds a confirmation form to uninstall selected modules. Namespace Drupal\system\Form Code protected $modules = array();

MemoryBackend::invalidateMultiple

public MemoryBackend::invalidateMultiple(array $cids) Marks cache items as invalid. Invalid items may be returned in later calls to get(), if the $allow_invalid argument is TRUE. Parameters string[] $cids: An array of cache IDs to invalidate. Overrides CacheBackendInterface::invalidateMultiple See also \Drupal\Core\Cache\CacheBackendInterface::deleteMultiple() \Drupal\Core\Cache\CacheBackendInterface::invalidate() \Drupal\Core\Cache\CacheBackendInterface::invalidateAll() File core/lib/Drupal/

InstallerException::__construct

public InstallerException::__construct($message, $title = 'Error', $code = 0, \Exception $previous = NULL) Constructs a new installer exception. Parameters string $title: The page title. string $message: (optional) The exception message. Defaults to 'Error'. int $code: (optional) The exception code. Defaults to 0. \Exception $previous: (optional) A previous exception. File core/lib/Drupal/Core/Installer/Exception/InstallerException.php, line 32 Class InstallerException Base class for exce

TermStorage::resetCache

public TermStorage::resetCache(array $ids = NULL) Resets the internal, static entity cache. Parameters $ids: (optional) If specified, the cache is reset for the entities with the given ids only. Overrides ContentEntityStorageBase::resetCache File core/modules/taxonomy/src/TermStorage.php, line 81 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function resetCache(array $ids = NULL) { drupal_static_reset('taxonomy_term_count_node

FieldConfigInterface::setPropertyConstraints

public FieldConfigInterface::setPropertyConstraints($name, array $constraints) Sets constraints for a given field item property. Note: this overwrites any existing property constraints. If you need to add to the existing constraints, use \Drupal\Core\Field\FieldConfigInterface::addPropertyConstraints() Note that constraints added via this method are not stored in configuration and as such need to be added at runtime using hook_entity_bundle_field_info_alter(). Parameters string $name: The name