PrivateKey::set

public PrivateKey::set($key) Sets the private key. Parameters string $key: The private key to set. File core/lib/Drupal/Core/PrivateKey.php, line 51 Class PrivateKey Manages the Drupal private key. Namespace Drupal\Core Code public function set($key) { return $this->state->set('system.private_key', $key); }

HtmlTag

Provides a render element for any HTML tag, with properties and value. Properties: #tag: The tag name to output. #attributes: (array, optional) HTML attributes to apply to the tag. The attributes are escaped, see \Drupal\Core\Template\Attribute. #value: (string, optional) A string containing the textual contents of the tag. #noscript: (bool, optional) When set to TRUE, the markup (including any prefix or suffix) will be wrapped in a <noscript> element. Usage example: $build['hello']

ConstraintViolationBuilder::$constraint

Type: Constraint File core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php, line 86 Class ConstraintViolationBuilder Defines a constraint violation builder for the Typed Data validator. Namespace Drupal\Core\TypedData\Validation Code protected $constraint;

NodeInterface::isPublished

public NodeInterface::isPublished() Returns the node published status indicator. Unpublished nodes are only visible to their authors and to administrators. Return value bool TRUE if the node is published. File core/modules/node/src/NodeInterface.php, line 107 Class NodeInterface Provides an interface defining a node entity. Namespace Drupal\node Code public function isPublished();

AddCssCommand

An AJAX command for adding css to the page via ajax. This command is implemented by Drupal.AjaxCommands.prototype.add_css() defined in misc/ajax.js. Hierarchy class \Drupal\Core\Ajax\AddCssCommand implements CommandInterface See also misc/ajax.js Related topics Ajax API Overview for Drupal's Ajax API. File core/lib/Drupal/Core/Ajax/AddCssCommand.php, line 15 Namespace Drupal\Core\Ajax Members Name Modifiers Type Description AddCssCommand::$styles protected property A

EntityDisplayFormBase::copyFormValuesToEntity

protected EntityDisplayFormBase::copyFormValuesToEntity(EntityInterface $entity, array $form, FormStateInterface $form_state) Copies top-level form values to entity properties This should not change existing entity properties that are not being edited by this form. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity the current form should operate upon. array $form: A nested array of form elements comprising the form. \Drupal\Core\Form\FormStateInterface $form_state: The current

Form generation

Describes how to generate and manipulate forms and process form submissions. Drupal provides a Form API in order to achieve consistency in its form processing and presentation, while simplifying code and reducing the amount of HTML that must be explicitly generated by a module. Creating forms Forms are defined as classes that implement the \Drupal\Core\Form\FormInterface and are built using the \Drupal\Core\Form\FormBuilder class. Drupal provides a couple of utility classes that can be extended

node_query_node_access_alter

node_query_node_access_alter(AlterableInterface $query) Implements hook_query_TAG_alter(). This is the hook_query_alter() for queries tagged with 'node_access'. It adds node access checks for the user account given by the 'account' meta-data (or current user if not provided), for an operation given by the 'op' meta-data (or 'view' if not provided; other possible values are 'update' and 'delete'). Queries tagged with 'node_access' that are not against the {node} table must add the base table as

ResourceResponseInterface::getResponseData

public ResourceResponseInterface::getResponseData() Returns response data that should be serialized. Return value mixed Response data that should be serialized. File core/modules/rest/src/ResourceResponseInterface.php, line 16 Class ResourceResponseInterface Defines a common interface for resource responses. Namespace Drupal\rest Code public function getResponseData();

node_access_rebuild

node_access_rebuild($batch_mode = FALSE) Rebuilds the node access database. This rebuild is occasionally needed by modules that make system-wide changes to access levels. When the rebuild is required by an admin-triggered action (e.g module settings form), calling node_access_needs_rebuild(TRUE) instead of node_access_rebuild() lets the user perform his changes and actually rebuild only once he is done. Note : As of Drupal 6, node access modules are not required to (and actually should not) cal