View::$base_field

The name of the base field to use. Type: string File core/modules/views/src/Entity/View.php, line 101 Class View Defines a View configuration entity class. Namespace Drupal\views\Entity Code protected $base_field = 'nid';

ManagedFile::processManagedFile

public static ManagedFile::processManagedFile(&$element, FormStateInterface $form_state, &$complete_form) Render API callback: Expands the managed_file element type. Expands the file type to include Upload and Remove buttons, as well as support for a default value. File core/modules/file/src/Element/ManagedFile.php, line 206 Class ManagedFile Provides an AJAX/progress aware widget for uploading and saving a file. Namespace Drupal\file\Element Code public static function process

StorageReplaceDataWrapper::rename

public StorageReplaceDataWrapper::rename($name, $new_name) Renames a configuration object in the storage. Parameters string $name: The name of a configuration object to rename. string $new_name: The new name of a configuration object. Return value bool TRUE on success, FALSE otherwise. Overrides StorageInterface::rename File core/modules/config/src/StorageReplaceDataWrapper.php, line 103 Class StorageReplaceDataWrapper Wraps a configuration storage to allow replacing specific configurati

AccessResult

Value object for passing an access result with cacheability metadata. The access result itself — excluding the cacheability metadata — is immutable. There are subclasses for each of the three possible access results themselves: When using ::orIf() and ::andIf(), cacheability metadata will be merged accordingly as well. Hierarchy class \Drupal\Core\Access\AccessResult implements AccessResultInterface, RefinableCacheableDependencyInterface uses RefinableCacheableDependencyTrait See also \Drup

template_preprocess_menu_local_action

template_preprocess_menu_local_action(&$variables) Prepares variables for single local action link templates. Default template: menu-local-action.html.twig. Parameters array $variables: An associative array containing: element: A render element containing: #link: A menu link array with 'title', 'url', and (optionally) 'localized_options' keys. Related topics Menu system Define the navigation menus, local actions and tasks, and contextual links. File core/includes/menu.inc, line 65 A

ModerationStateInterface

Provides an interface for defining Moderation state entities. Hierarchy interface \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterfaceinterface \Drupal\Core\Config\Entity\ConfigEntityInterfaceinterface \Drupal\content_moderation\ModerationStateInterface File core/modules/content_moderation/src/ModerationStateInterface.php, line 10 Namespace Drupal\content_moderation Members Name Modifiers Type Description AccessibleInterface::

file_file_download

file_file_download($uri) Implements hook_file_download(). File core/modules/file/file.module, line 590 Defines a "managed_file" Form API field and a "file" field for Field module. Code function file_file_download($uri) { // Get the file record based on the URI. If not in the database just return. /** @var \Drupal\file\FileInterface[] $files */ $files = entity_load_multiple_by_properties('file', array('uri' => $uri)); if (count($files)) { foreach ($files as $item) { // Sin

FieldStorageAddForm::buildForm

public FieldStorageAddForm::buildForm(array $form, FormStateInterface $form_state, $entity_type_id = NULL, $bundle = NULL) Form constructor. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value array The form structure. Overrides FormInterface::buildForm File core/modules/field_ui/src/Form/FieldStorageAddForm.php, line 104 Class FieldStorageAddForm Provides a form f

HeadersCacheContext::getCacheableMetadata

public HeadersCacheContext::getCacheableMetadata($header = NULL) Gets the cacheability metadata for the context based on the parameter value. There are three valid cases for the returned CacheableMetadata object: An empty object means this can be optimized away safely. A max-age of 0 means that this context can never be optimized away. It will never bubble up and cache tags will not be used. Any non-zero max-age and cache tags will bubble up into the cache item if this is optimized away to allo

BookManager::checkNodeIsRemovable

public BookManager::checkNodeIsRemovable(NodeInterface $node) Determines if a node can be removed from the book. A node can be removed from a book if it is actually in a book and it either is not a top-level page or is a top-level page with no children. Parameters \Drupal\node\NodeInterface $node: The node to remove from the outline. Return value bool TRUE if a node can be removed from the book, FALSE otherwise. Overrides BookManagerInterface::checkNodeIsRemovable File core/modules/book/src/B