hook_countries_alter

hook_countries_alter(&$countries) Alter the default country list. Parameters $countries: The associative array of countries keyed by two-letter country code. See also \Drupal\Core\Locale\CountryManager::getList() Related topics Hooks Define functions that alter the behavior of Drupal core. File core/core.api.php, line 2116 Documentation landing page and topics, plus core library hooks. Code function hook_countries_alter(&$countries) { // Elbonia is now independent, so add it to

ImageStyle::getReplacementID

public ImageStyle::getReplacementID() Returns the replacement ID. Return value string|null The replacement image style ID or NULL if no replacement has been selected. Overrides ImageStyleInterface::getReplacementID Deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.x. Use \Drupal\image\ImageStyleStorageInterface::getReplacementId() instead. See also \Drupal\image\ImageStyleStorageInterface::getReplacementId() File core/modules/image/src/Entity/ImageStyle.php, line 380 Class

MenuLinkTree::$treeStorage

The menu link tree storage. Type: \Drupal\Core\Menu\MenuTreeStorageInterface File core/lib/Drupal/Core/Menu/MenuLinkTree.php, line 22 Class MenuLinkTree Implements the loading, transforming and rendering of menu link trees. Namespace Drupal\Core\Menu Code protected $treeStorage;

DataDefinition::getSettings

public DataDefinition::getSettings() Returns the array of settings, as required by the used class. See the documentation of the class for supported or required settings. Return value array The array of settings. Overrides DataDefinitionInterface::getSettings File core/lib/Drupal/Core/TypedData/DataDefinition.php, line 215 Class DataDefinition A typed data definition class for defining data based on defined data types. Namespace Drupal\Core\TypedData Code public function getSettings()

ShowButtonsCommand::$changed

Whether the view has been changed. Type: bool File core/modules/views/src/Ajax/ShowButtonsCommand.php, line 20 Class ShowButtonsCommand Provides an AJAX command for showing the save and cancel buttons. Namespace Drupal\views\Ajax Code protected $changed;

telephone_field_formatter_info_alter

telephone_field_formatter_info_alter(&$info) Implements hook_field_formatter_info_alter(). File core/modules/telephone/telephone.module, line 33 Defines a simple telephone number field type. Code function telephone_field_formatter_info_alter(&$info) { $info['string']['field_types'][] = 'telephone'; }

CommentAdminOverview::__construct

public CommentAdminOverview::__construct(EntityManagerInterface $entity_manager, CommentStorageInterface $comment_storage, DateFormatterInterface $date_formatter, ModuleHandlerInterface $module_handler) Creates a CommentAdminOverview form. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service. \Drupal\comment\CommentStorageInterface $comment_storage: The comment storage. \Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter

ThemeHandler::__construct

public ThemeHandler::__construct($root, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, StateInterface $state, InfoParserInterface $info_parser, ExtensionDiscovery $extension_discovery = NULL) Constructs a new ThemeHandler. Parameters string $root: The app root. \Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory to get the installed themes. \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to fire theme

BatchStorageInterface::create

public BatchStorageInterface::create(array $batch) Creates and saves a batch. Parameters array $batch: The array representing the batch to create. File core/lib/Drupal/Core/Batch/BatchStorageInterface.php, line 27 Class BatchStorageInterface Defines a common interface for batch storage operations. Namespace Drupal\Core\Batch Code public function create(array $batch);

user_password

user_password($length = 10) Generate a random alphanumeric password. File core/modules/user/user.module, line 281 Enables the user registration and login system. Code function user_password($length = 10) { // This variable contains the list of allowable characters for the // password. Note that the number 0 and the letter 'O' have been // removed to avoid confusion between the two. The same is true // of 'I', 1, and 'l'. $allowable_characters = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLM