VocabularyStorageInterface::getToplevelTids

public VocabularyStorageInterface::getToplevelTids($vids) Gets top-level term IDs of vocabularies. Parameters array $vids: Array of vocabulary IDs. Return value array Array of top-level term IDs. File core/modules/taxonomy/src/VocabularyStorageInterface.php, line 21 Class VocabularyStorageInterface Defines an interface for vocabulary entity storage classes. Namespace Drupal\taxonomy Code public function getToplevelTids($vids);

watchdog_exception

watchdog_exception($type, Exception $exception, $message = NULL, $variables = array(), $severity = RfcLogLevel::ERROR, $link = NULL) Logs an exception. This is a wrapper logging function which automatically decodes an exception. Parameters $type: The category to which this message belongs. $exception: The exception that is going to be logged. $message: The message to store in the log. If empty, a text that contains all useful information about the passed-in exception is used. $variables: Array

Weight

Provides a form element for input of a weight. Weights are integers used to indicate ordering, with larger numbers later in the order. Properties: #delta: The range of possible weight values used. A delta of 10 would indicate possible weight values between -10 and 10. Usage example: $form['weight'] = array( '#type' => 'weight', '#title' => $this->t('Weight'), '#default_value' => $edit['weight'], '#delta' => 10, ); Plugin annotation @FormElement("weight") Hierarchy cl

Weight::getInfo

public Weight::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Weight.php, line 34 Class Weight Provides a form element for input of a weight. Namespace Drupal\Core\Render\Element Code public func

Weight::processWeight

public static Weight::processWeight(&$element, FormStateInterface $form_state, &$complete_form) Expands a weight element into a select element. File core/lib/Drupal/Core/Render/Element/Weight.php, line 50 Class Weight Provides a form element for input of a weight. Namespace Drupal\Core\Render\Element Code public static function processWeight(&$element, FormStateInterface $form_state, &$complete_form) { $element['#is_weight'] = TRUE; $element_info_manager = \Drupal:

WidgetBase

Base class for 'Field widget' plugin implementations. Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Field\PluginSettingsBase implements DependentPluginInterface, PluginSettingsInterfaceclass \Drupal\Core\Field\WidgetBase implements WidgetInterface uses AllowedTagsXssTrait Related topics Field Widget API De

WidgetBase::$fieldDefinition

The field definition. Type: \Drupal\Core\Field\FieldDefinitionInterface File core/lib/Drupal/Core/Field/WidgetBase.php, line 27 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected $fieldDefinition;

WidgetBase::$settings

The widget settings. Type: array Overrides PluginSettingsBase::$settings File core/lib/Drupal/Core/Field/WidgetBase.php, line 34 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected $settings;

WidgetBase::addMoreAjax

public static WidgetBase::addMoreAjax(array $form, FormStateInterface $form_state) Ajax callback for the "Add another item" button. This returns the new page content to replace the page content made obsolete by the form submission. File core/lib/Drupal/Core/Field/WidgetBase.php, line 291 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code public static function addMoreAjax(array $form, FormStateInterface $form_state) { $button = $fo

WidgetBase::addMoreSubmit

public static WidgetBase::addMoreSubmit(array $form, FormStateInterface $form_state) Submission handler for the "Add another item" button. File core/lib/Drupal/Core/Field/WidgetBase.php, line 269 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code public static function addMoreSubmit(array $form, FormStateInterface $form_state) { $button = $form_state->getTriggeringElement(); // Go one level up in the form, to the widgets cont