2023-02-02T12:07:34+00:00
/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:323/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:462023-02-02T12:06:46+00:00
2024-01-21T13:29:53+00:00
/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/MapDataDefinition.php:40/** * Sets the definition of a map property. * * @param string $name * The name of the property to define. * @param \Drupal\Core\TypedData\DataDefinitionInterface|null $definition * (optional) The property definition to set, or NULL to unset it. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/MapDataDefinition.php:57
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/MapDataDefinition.php:70/** * Sets the main property name. * * @param string|null $name * The name of the main property, or NULL if there is none. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/MapDataDefinition.php:82
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:25/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:42/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new map definition. * * @param string $type * (optional) The data type of the map. Defaults to 'map'. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/MapDataDefinition.php:25
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/MapDataDefinition.php:33/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/FieldType/ComputedMetatagsFieldItem.php:46/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:60/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:81/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:88/** * Returns the array of field settings. * * @return array * The array of settings. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:98
/** * Returns the value of a field setting. * * @param string $setting_name * The setting name. * * @return mixed * The setting value. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:111
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:118/**
* {@inheritdoc}
*
* Different to the parent Map class, we avoid creating property objects as
* far as possible in order to optimize performance. Thus we just update
* $this->values if no property object has been created yet.
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:135/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:150/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:186/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:208/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:218/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:233/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:240/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:56/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:104/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:163/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:187/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\Map Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:214
/**
* {@inheritdoc}
*
* @param string $property_name
* The name of the property.
* @param bool $notify
* (optional) Whether to forward the notification to the parent. Defaults to
* TRUE. By passing FALSE, overrides of this method can re-use the logic
* of parent classes without triggering notification.
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:231/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:241/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:119/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/FieldType/ComputedMetatagsFieldItem.php:26/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/FieldType/ComputedMetatagsFieldItem.php:33/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:25/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:32/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:39/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:53/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:223/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:247/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:254/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:268/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:275/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:282/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:289/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/** * Defines field item properties. * * Properties that are required to constitute a valid, non-empty item should * be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired(). * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of property definitions of contained properties, keyed by * property name. * * @see \Drupal\Core\Field\BaseFieldDefinition */ Inherited from Drupal\Core\Field\FieldItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:35
/**
* Returns the schema for the field.
*
* This method is static because the field schema information is needed on
* creation of the field. FieldItemInterface objects instantiated at that
* time are not reliable as field settings might be missing.
*
* Computed fields having no schema should return an empty array.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition
* The field definition.
*
* @return array
* An empty array if there is no schema, or an associative array with the
* following key/value pairs:
* - columns: An array of Schema API column specifications, keyed by column
* name. The columns need to be a subset of the properties defined in
* propertyDefinitions(). The 'not null' property is ignored if present,
* as it is determined automatically by the storage controller depending
* on the table layout and the property definitions. It is recommended to
* avoid having the column definitions depend on field settings when
* possible. No assumptions should be made on how storage engines
* internally use the original column name to structure their storage.
* - unique keys: (optional) An array of Schema API unique key definitions.
* Only columns that appear in the 'columns' array are allowed.
* - indexes: (optional) An array of Schema API index definitions. Only
* columns that appear in the 'columns' array are allowed. Those indexes
* will be used as default indexes. Field definitions can specify
* additional indexes or, at their own risk, modify the default indexes
* specified by the field-type module. Some storage engines might not
* support indexes.
* - foreign keys: (optional) An array of Schema API foreign key
* definitions. Note, however, that the field data is not necessarily
* stored in SQL. Also, the possible usage is limited, as you cannot
* specify another field as related, only existing SQL tables,
* such as {taxonomy_term_data}.
*
* @throws \Drupal\Core\Field\FieldException
* Throws an exception if the schema is invalid.
*/
Inherited from Drupal\Core\Field\FieldItemInterface
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/FieldType/ComputedMetatagsFieldItem.php:46/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:60/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:81/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:88/** * Returns the array of field settings. * * @return array * The array of settings. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:98
/** * Returns the value of a field setting. * * @param string $setting_name * The setting name. * * @return mixed * The setting value. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:111
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:118/**
* {@inheritdoc}
*
* Different to the parent Map class, we avoid creating property objects as
* far as possible in order to optimize performance. Thus we just update
* $this->values if no property object has been created yet.
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:135/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:150/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:186/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:208/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:218/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:233/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:240/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:56/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:104/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:163/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:187/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\Map Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:214
/**
* {@inheritdoc}
*
* @param string $property_name
* The name of the property.
* @param bool $notify
* (optional) Whether to forward the notification to the parent. Defaults to
* TRUE. By passing FALSE, overrides of this method can re-use the logic
* of parent classes without triggering notification.
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:231/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:241/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:119/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/FieldType/ComputedMetatagsFieldItem.php:26/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/FieldType/ComputedMetatagsFieldItem.php:33/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:25/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:32/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:39/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:53/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:223/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:247/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:254/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:268/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:275/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:282/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:289/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/** * Defines field item properties. * * Properties that are required to constitute a valid, non-empty item should * be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired(). * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of property definitions of contained properties, keyed by * property name. * * @see \Drupal\Core\Field\BaseFieldDefinition */ Inherited from Drupal\Core\Field\FieldItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:35
/**
* Returns the schema for the field.
*
* This method is static because the field schema information is needed on
* creation of the field. FieldItemInterface objects instantiated at that
* time are not reliable as field settings might be missing.
*
* Computed fields having no schema should return an empty array.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition
* The field definition.
*
* @return array
* An empty array if there is no schema, or an associative array with the
* following key/value pairs:
* - columns: An array of Schema API column specifications, keyed by column
* name. The columns need to be a subset of the properties defined in
* propertyDefinitions(). The 'not null' property is ignored if present,
* as it is determined automatically by the storage controller depending
* on the table layout and the property definitions. It is recommended to
* avoid having the column definitions depend on field settings when
* possible. No assumptions should be made on how storage engines
* internally use the original column name to structure their storage.
* - unique keys: (optional) An array of Schema API unique key definitions.
* Only columns that appear in the 'columns' array are allowed.
* - indexes: (optional) An array of Schema API index definitions. Only
* columns that appear in the 'columns' array are allowed. Those indexes
* will be used as default indexes. Field definitions can specify
* additional indexes or, at their own risk, modify the default indexes
* specified by the field-type module. Some storage engines might not
* support indexes.
* - foreign keys: (optional) An array of Schema API foreign key
* definitions. Note, however, that the field data is not necessarily
* stored in SQL. Also, the possible usage is limited, as you cannot
* specify another field as related, only existing SQL tables,
* such as {taxonomy_term_data}.
*
* @throws \Drupal\Core\Field\FieldException
* Throws an exception if the schema is invalid.
*/
Inherited from Drupal\Core\Field\FieldItemInterface
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/MetatagEntityFieldItemList.php:30/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/MetatagEntityFieldItemList.php:37/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:50/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:145/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:323/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:42/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:61/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:69/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:89/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:105/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:121/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:97/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:129/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:137/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:113/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Ensures that values are only computed once. */ Defined in <drupal>/modules/contrib/metatag/src/TypedData/ComputedItemListTrait.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:45/** * Gets the data value currently stored in database. * * @return mixed * The data value. */ Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:66
/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:84/** * Returns TRUE if a value was set. */ Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:95
/** * Persists the state. */ Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:102
/** * Deletes the stored state. */ Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:115
/** * Returns the key value collection that should be used for the given entity. * * @return string */ Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:125
/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:119/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:138/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Deletes the URL aliases for multiple entities of the same type. * * @param string $entity_type_id * The entity type ID of entities being deleted. * @param int[] $pids_by_id * A list of path IDs keyed by entity ID. */ Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:137
/**
* Gets the key-value store entry key for 'pathauto_state.*' collections.
*
* Normally we want to use the entity ID as key for 'pathauto_state.*'
* collection entries. But some entity types may use string IDs. When such IDs
* are exceeding 128 characters, which is the limit for the 'name' column in
* the {key_value} table, the insertion of the ID in {key_value} will fail.
* Thus we test if we can use the plain ID or we need to store a hashed
* version of the entity ID. Also, it is not possible to rely on the UUID as
* entity types might not have one or might use a non-standard format.
*
* The code is inspired by
* \Drupal\Core\Cache\DatabaseBackend::normalizeCid().
*
* @param int|string $entity_id
* The entity id for which to compute the key.
*
* @return int|string
* The key used to store the value in the key-value store.
*
* @see \Drupal\Core\Cache\DatabaseBackend::normalizeCid()
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoState.php:181/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoItem.php:30/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoItem.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathItem
Defined in <drupal>/core/modules/path/src/Plugin/Field/FieldType/PathItem.php:61/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:60/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:81/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:88/** * Returns the array of field settings. * * @return array * The array of settings. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:98
/** * Returns the value of a field setting. * * @param string $setting_name * The setting name. * * @return mixed * The setting value. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:111
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:118/**
* {@inheritdoc}
*
* Different to the parent Map class, we avoid creating property objects as
* far as possible in order to optimize performance. Thus we just update
* $this->values if no property object has been created yet.
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:135/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:150/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:186/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:218/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:233/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:240/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:56/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:104/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:163/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:187/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\Map Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:214
/**
* {@inheritdoc}
*
* @param string $property_name
* The name of the property.
* @param bool $notify
* (optional) Whether to forward the notification to the parent. Defaults to
* TRUE. By passing FALSE, overrides of this method can re-use the logic
* of parent classes without triggering notification.
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:231/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:241/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:119/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoItem.php:17/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/path/src/Plugin/Field/FieldType/PathItem.php:43/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/path/src/Plugin/Field/FieldType/PathItem.php:118/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/path/src/Plugin/Field/FieldType/PathItem.php:127/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:25/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:32/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:39/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:247/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:254/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:268/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:275/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:282/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:289/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/path/src/Plugin/Field/FieldType/PathItem.php:30/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:53/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:223/** * Defines field item properties. * * Properties that are required to constitute a valid, non-empty item should * be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired(). * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of property definitions of contained properties, keyed by * property name. * * @see \Drupal\Core\Field\BaseFieldDefinition */ Inherited from Drupal\Core\Field\FieldItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:35
/**
* Returns the schema for the field.
*
* This method is static because the field schema information is needed on
* creation of the field. FieldItemInterface objects instantiated at that
* time are not reliable as field settings might be missing.
*
* Computed fields having no schema should return an empty array.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition
* The field definition.
*
* @return array
* An empty array if there is no schema, or an associative array with the
* following key/value pairs:
* - columns: An array of Schema API column specifications, keyed by column
* name. The columns need to be a subset of the properties defined in
* propertyDefinitions(). The 'not null' property is ignored if present,
* as it is determined automatically by the storage controller depending
* on the table layout and the property definitions. It is recommended to
* avoid having the column definitions depend on field settings when
* possible. No assumptions should be made on how storage engines
* internally use the original column name to structure their storage.
* - unique keys: (optional) An array of Schema API unique key definitions.
* Only columns that appear in the 'columns' array are allowed.
* - indexes: (optional) An array of Schema API index definitions. Only
* columns that appear in the 'columns' array are allowed. Those indexes
* will be used as default indexes. Field definitions can specify
* additional indexes or, at their own risk, modify the default indexes
* specified by the field-type module. Some storage engines might not
* support indexes.
* - foreign keys: (optional) An array of Schema API foreign key
* definitions. Note, however, that the field data is not necessarily
* stored in SQL. Also, the possible usage is limited, as you cannot
* specify another field as related, only existing SQL tables,
* such as {taxonomy_term_data}.
*
* @throws \Drupal\Core\Field\FieldException
* Throws an exception if the schema is invalid.
*/
Inherited from Drupal\Core\Field\FieldItemInterface
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:91/**
* @{inheritdoc}
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoFieldItemList.php:12/**
* @{inheritdoc}
*/
Defined in <drupal>/modules/contrib/pathauto/src/PathautoFieldItemList.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php:47/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:50/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:145/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:323/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:61/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:69/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:89/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:105/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:121/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:97/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:137/**
* {@inheritdoc}
*/
Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:113/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Ensures that values are only computed once. */ Inherited from Drupal\path\Plugin\Field\FieldType\PathFieldItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:32
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:323/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
Specifies the action that should be used when the redirect path is invalid or empty.
Specifies the action that should be used when the redirect path is invalid or empty.
/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
Specifies the action that should be used when the redirect path is invalid or empty.
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:323/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/** * Constructs a TranslationManager object. * * @param \Drupal\Core\Language\LanguageDefault $default_language * The default language. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:52
/** * Appends a translation system to the translation chain. * * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator * The translation interface to be appended to the translation chain. * @param int $priority * The priority of the logger being added. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:66
/** * Sorts translators according to priority. * * @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] * A sorted array of translator objects. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:79
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:87/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:104/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:112/** * Translates a string to the current language or to a given language. * * @param string $string * A string containing the English text to translate. * @param array $options * An associative array of additional options, with the following elements: * - 'langcode': The language code to translate to a language other than * what is used to display the page. * - 'context': The context the source string belongs to. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:130
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:148/** * Sets the default langcode. * * @param string $langcode * A language code. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:158
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslationManager.php:165/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/token/src/MenuLinkFieldItemList.php:20/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:16/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:26/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:107/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:50/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:145/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:42/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:61/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:69/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:89/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:105/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:121/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:97/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:129/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:137/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:113/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Ensures that values are only computed once. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php:32
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:62/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.body
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.body
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/text/src/Plugin/Field/FieldType/TextFieldItemList.php:16/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:323/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.field_domain_access
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.field_domain_access
config:domain.config.temporada_grandvaliraresorts_com.field.storage.node.field_domain_access
config:domain.config.temporada_grandvaliraresorts_com.es.field.storage.node.field_domain_access
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceTargetDefinition.php:22/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:69/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:100/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:119/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:126/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:141/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:25/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:35/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:42/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new entity definition. * * @param string $entity_type_id * (optional) The ID of the entity type, or NULL if the entity type is * unknown. Defaults to NULL. * @param string $bundle * (optional) The bundle of the entity type, or NULL if the bundle is * unknown. Defaults to NULL. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:24
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:58/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:48/** * Sets the definition of the referenced data. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The target definition to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:60
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data reference definition. * * @param string $target_data_type * The data type of the referenced data. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:37/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a FieldStorageConfig object. * * In most cases, Field entities are created via * FieldStorageConfig::create($values)), where $values is the same parameter * as in this constructor. * * @param array $values * An array of field properties, keyed by property name. Most array * elements will be used to set the corresponding properties on the class; * see the class property documentation for details. Some array elements * have special meanings and a few are required. Special elements are: * - name: required. As a temporary Backwards Compatibility layer right now, * a 'field_name' property can be accepted in place of 'id'. * - entity_type: required. * - type: required. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_storage_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:265
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:293/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:320
/** * Prepares saving a new field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:350
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:376/** * Prepares saving an updated field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:397
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:421/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:479/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:505/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:512/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:519/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:527/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:547/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:554/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:568/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:582/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:601/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:609/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:617/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:624/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:632/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:640/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:647/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:654/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:661/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:678/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:686/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:713/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:721/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:728/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:736/** * Determines whether a field has any data. * * @return bool * TRUE if the field has data for any entity; FALSE otherwise. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:746
/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:758
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:769/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:776/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:783/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:795/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:806/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:813/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:821/** * Helper to retrieve the field item class. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:828
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:853/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:863/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:870/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:476/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:264
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/** * Gets an array of placeholders for this entity. * * Individual entity classes may override this method to add additional * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @param string $rel * The link relationship type, for example: canonical or edit-form. * * @return array * An array of URI placeholders. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:294
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:464/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldStorageConfigInterface|null * The field config entity if one exists for the provided field name, * otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:846
/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.field_domain_access
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.field_domain_access
/** * Constructs a FieldStorageConfig object. * * In most cases, Field entities are created via * FieldStorageConfig::create($values)), where $values is the same parameter * as in this constructor. * * @param array $values * An array of field properties, keyed by property name. Most array * elements will be used to set the corresponding properties on the class; * see the class property documentation for details. Some array elements * have special meanings and a few are required. Special elements are: * - name: required. As a temporary Backwards Compatibility layer right now, * a 'field_name' property can be accepted in place of 'id'. * - entity_type: required. * - type: required. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_storage_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:265
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:293/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:320
/** * Prepares saving a new field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:350
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:376/** * Prepares saving an updated field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:397
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:421/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:479/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:505/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:512/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:519/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:527/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:547/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:554/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:568/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:582/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:601/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:609/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:617/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:624/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:632/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:640/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:647/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:654/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:661/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:678/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:686/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:713/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:721/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:728/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:736/** * Determines whether a field has any data. * * @return bool * TRUE if the field has data for any entity; FALSE otherwise. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:746
/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:758
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:769/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:776/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:783/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:795/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:806/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:813/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:821/** * Helper to retrieve the field item class. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:828
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:853/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:863/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:870/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:476/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:264
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/** * Gets an array of placeholders for this entity. * * Individual entity classes may override this method to add additional * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @param string $rel * The link relationship type, for example: canonical or edit-form. * * @return array * An array of URI placeholders. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:294
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:464/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldStorageConfigInterface|null * The field config entity if one exists for the provided field name, * otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:846
/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:48/** * Sets the definition of the referenced data. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The target definition to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:60
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data reference definition. * * @param string $target_data_type * The data type of the referenced data. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:37/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Gets the definition of the referenced entity. * * @return \Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface * The reference target's definition. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:51
/** * Checks whether the target entity has not been saved yet. * * @return bool * TRUE if the entity is new, FALSE otherwise. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:61
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:69/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:83/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:95/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:122/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataReferenceBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceBase.php:36/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:119/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:138/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:213/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:228/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:272/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:302/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:316/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:415/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:442/** * Determines whether the item holds an unsaved entity. * * This is notably used for "autocreate" widgets, and more generally to * support referencing freshly created entities (they will get saved * automatically as the hosting entity gets saved). * * @return bool * TRUE if the item holds an unsaved entity. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:533
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:649/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:656/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:663/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:60/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:81/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:88/** * Returns the array of field settings. * * @return array * The array of settings. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:98
/** * Returns the value of a field setting. * * @param string $setting_name * The setting name. * * @return mixed * The setting value. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:111
/**
* {@inheritdoc}
*
* Different to the parent Map class, we avoid creating property objects as
* far as possible in order to optimize performance. Thus we just update
* $this->values if no property object has been created yet.
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:135/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:150/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:186/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:218/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:104/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:163/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:187/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\Map Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:214
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:241/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:49/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:58/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:68/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:116/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:159/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:166/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:334/** * Gets a bundle for a given entity type and selection options. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type. * @param array $selection_settings * An array of selection settings. * * @return string|null * Either the bundle string, or NULL if there is no bundle. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:400
/** * Form element validation handler; Invokes selection plugin's validation. * * @param array $form * The form where the settings form is being included in. * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:517
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:580/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:590/** * Render API callback: Processes the field settings form. * * @see static::fieldSettingsForm() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:699
/** * Adds the field settings to AJAX form elements. * * @see static::fieldSettingsAjaxProcess() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:709
/** * Render API callback that moves entity reference elements up a level. * * The elements (i.e. 'handler_settings') are moved for easier processing by * the validation and submission handlers. * * @see _entity_reference_field_settings_process() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:732
/** * Submit handler for the non-JS case. * * @see static::fieldSettingsForm() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:744
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:753/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:781/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:247/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:254/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:268/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:25/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:32/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:39/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:53/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:223/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:275/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:282/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:289/** * Defines field item properties. * * Properties that are required to constitute a valid, non-empty item should * be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired(). * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of property definitions of contained properties, keyed by * property name. * * @see \Drupal\Core\Field\BaseFieldDefinition */ Inherited from Drupal\Core\Field\FieldItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:35
/**
* Returns the schema for the field.
*
* This method is static because the field schema information is needed on
* creation of the field. FieldItemInterface objects instantiated at that
* time are not reliable as field settings might be missing.
*
* Computed fields having no schema should return an empty array.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition
* The field definition.
*
* @return array
* An empty array if there is no schema, or an associative array with the
* following key/value pairs:
* - columns: An array of Schema API column specifications, keyed by column
* name. The columns need to be a subset of the properties defined in
* propertyDefinitions(). The 'not null' property is ignored if present,
* as it is determined automatically by the storage controller depending
* on the table layout and the property definitions. It is recommended to
* avoid having the column definitions depend on field settings when
* possible. No assumptions should be made on how storage engines
* internally use the original column name to structure their storage.
* - unique keys: (optional) An array of Schema API unique key definitions.
* Only columns that appear in the 'columns' array are allowed.
* - indexes: (optional) An array of Schema API index definitions. Only
* columns that appear in the 'columns' array are allowed. Those indexes
* will be used as default indexes. Field definitions can specify
* additional indexes or, at their own risk, modify the default indexes
* specified by the field-type module. Some storage engines might not
* support indexes.
* - foreign keys: (optional) An array of Schema API foreign key
* definitions. Note, however, that the field data is not necessarily
* stored in SQL. Also, the possible usage is limited, as you cannot
* specify another field as related, only existing SQL tables,
* such as {taxonomy_term_data}.
*
* @throws \Drupal\Core\Field\FieldException
* Throws an exception if the schema is invalid.
*/
Inherited from Drupal\Core\Field\FieldItemInterface
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:91/** * Returns the referenceable entity types and bundles. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition for which to retrieve the referenceable entity * types and bundles. * * @return array * An array of referenceable bundles where the array is keyed by the entity * type ID, with values an array of bundle names. (It is a single-value * array with the entity type ID if the entity type does not implement * bundles.) */ Inherited from Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItemInterface.php:28
config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.field_domain_access
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.field_domain_access
/** * Constructs a FieldStorageConfig object. * * In most cases, Field entities are created via * FieldStorageConfig::create($values)), where $values is the same parameter * as in this constructor. * * @param array $values * An array of field properties, keyed by property name. Most array * elements will be used to set the corresponding properties on the class; * see the class property documentation for details. Some array elements * have special meanings and a few are required. Special elements are: * - name: required. As a temporary Backwards Compatibility layer right now, * a 'field_name' property can be accepted in place of 'id'. * - entity_type: required. * - type: required. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_storage_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:265
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:293/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:320
/** * Prepares saving a new field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:350
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:376/** * Prepares saving an updated field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:397
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:421/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:479/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:505/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:512/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:519/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:527/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:547/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:554/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:568/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:582/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:601/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:609/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:617/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:624/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:632/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:640/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:647/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:654/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:661/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:678/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:686/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:713/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:721/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:728/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:736/** * Determines whether a field has any data. * * @return bool * TRUE if the field has data for any entity; FALSE otherwise. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:746
/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:758
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:769/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:776/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:783/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:795/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:806/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:813/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:821/** * Helper to retrieve the field item class. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:828
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:853/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:863/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:870/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:476/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:264
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/** * Gets an array of placeholders for this entity. * * Individual entity classes may override this method to add additional * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @param string $rel * The link relationship type, for example: canonical or edit-form. * * @return array * An array of URI placeholders. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:294
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:464/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldStorageConfigInterface|null * The field config entity if one exists for the provided field name, * otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:846
/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:48/** * Sets the definition of the referenced data. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The target definition to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:60
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data reference definition. * * @param string $target_data_type * The data type of the referenced data. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:37/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Gets the definition of the referenced entity. * * @return \Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface * The reference target's definition. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:51
/** * Checks whether the target entity has not been saved yet. * * @return bool * TRUE if the entity is new, FALSE otherwise. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:61
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:69/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:83/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:95/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:122/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataReferenceBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceBase.php:36/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:119/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:138/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:213/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:228/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:272/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:302/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:316/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:415/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:442/** * Determines whether the item holds an unsaved entity. * * This is notably used for "autocreate" widgets, and more generally to * support referencing freshly created entities (they will get saved * automatically as the hosting entity gets saved). * * @return bool * TRUE if the item holds an unsaved entity. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:533
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:649/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:656/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:663/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:60/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:81/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:88/** * Returns the array of field settings. * * @return array * The array of settings. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:98
/** * Returns the value of a field setting. * * @param string $setting_name * The setting name. * * @return mixed * The setting value. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:111
/**
* {@inheritdoc}
*
* Different to the parent Map class, we avoid creating property objects as
* far as possible in order to optimize performance. Thus we just update
* $this->values if no property object has been created yet.
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:135/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:150/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:186/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:218/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:104/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:163/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:187/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\Map Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:214
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:241/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:49/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:58/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:68/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:116/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:159/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:166/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:334/** * Gets a bundle for a given entity type and selection options. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type. * @param array $selection_settings * An array of selection settings. * * @return string|null * Either the bundle string, or NULL if there is no bundle. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:400
/** * Form element validation handler; Invokes selection plugin's validation. * * @param array $form * The form where the settings form is being included in. * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:517
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:580/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:590/** * Render API callback: Processes the field settings form. * * @see static::fieldSettingsForm() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:699
/** * Adds the field settings to AJAX form elements. * * @see static::fieldSettingsAjaxProcess() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:709
/** * Render API callback that moves entity reference elements up a level. * * The elements (i.e. 'handler_settings') are moved for easier processing by * the validation and submission handlers. * * @see _entity_reference_field_settings_process() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:732
/** * Submit handler for the non-JS case. * * @see static::fieldSettingsForm() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:744
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:753/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:781/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:247/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:254/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:268/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:25/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:32/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:39/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:53/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:223/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:275/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:282/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:289/** * Defines field item properties. * * Properties that are required to constitute a valid, non-empty item should * be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired(). * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of property definitions of contained properties, keyed by * property name. * * @see \Drupal\Core\Field\BaseFieldDefinition */ Inherited from Drupal\Core\Field\FieldItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:35
/**
* Returns the schema for the field.
*
* This method is static because the field schema information is needed on
* creation of the field. FieldItemInterface objects instantiated at that
* time are not reliable as field settings might be missing.
*
* Computed fields having no schema should return an empty array.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition
* The field definition.
*
* @return array
* An empty array if there is no schema, or an associative array with the
* following key/value pairs:
* - columns: An array of Schema API column specifications, keyed by column
* name. The columns need to be a subset of the properties defined in
* propertyDefinitions(). The 'not null' property is ignored if present,
* as it is determined automatically by the storage controller depending
* on the table layout and the property definitions. It is recommended to
* avoid having the column definitions depend on field settings when
* possible. No assumptions should be made on how storage engines
* internally use the original column name to structure their storage.
* - unique keys: (optional) An array of Schema API unique key definitions.
* Only columns that appear in the 'columns' array are allowed.
* - indexes: (optional) An array of Schema API index definitions. Only
* columns that appear in the 'columns' array are allowed. Those indexes
* will be used as default indexes. Field definitions can specify
* additional indexes or, at their own risk, modify the default indexes
* specified by the field-type module. Some storage engines might not
* support indexes.
* - foreign keys: (optional) An array of Schema API foreign key
* definitions. Note, however, that the field data is not necessarily
* stored in SQL. Also, the possible usage is limited, as you cannot
* specify another field as related, only existing SQL tables,
* such as {taxonomy_term_data}.
*
* @throws \Drupal\Core\Field\FieldException
* Throws an exception if the schema is invalid.
*/
Inherited from Drupal\Core\Field\FieldItemInterface
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:91/** * Returns the referenceable entity types and bundles. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition for which to retrieve the referenceable entity * types and bundles. * * @return array * An array of referenceable bundles where the array is keyed by the entity * type ID, with values an array of bundle names. (It is a single-value * array with the entity type ID if the entity type does not implement * bundles.) */ Inherited from Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItemInterface.php:28
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:16/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:26/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:107/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:62/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.field_domain_source
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.field_domain_source
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:16/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:26/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:107/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:62/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.field_metatags
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.field_metatags
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/metatag/src/Plugin/Field/FieldType/MetatagFieldItemList.php:16/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:323/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:335/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.webform
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.webform
config:domain.config.temporada_grandvaliraresorts_com.field.storage.node.webform
config:domain.config.temporada_grandvaliraresorts_com.es.field.storage.node.webform
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceTargetDefinition.php:22/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:69/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:100/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:119/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:126/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:141/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:25/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:35/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:42/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new entity definition. * * @param string $entity_type_id * (optional) The ID of the entity type, or NULL if the entity type is * unknown. Defaults to NULL. * @param string $bundle * (optional) The bundle of the entity type, or NULL if the bundle is * unknown. Defaults to NULL. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:24
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:58/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:48/** * Sets the definition of the referenced data. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The target definition to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:60
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data reference definition. * * @param string $target_data_type * The data type of the referenced data. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:37/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a FieldStorageConfig object. * * In most cases, Field entities are created via * FieldStorageConfig::create($values)), where $values is the same parameter * as in this constructor. * * @param array $values * An array of field properties, keyed by property name. Most array * elements will be used to set the corresponding properties on the class; * see the class property documentation for details. Some array elements * have special meanings and a few are required. Special elements are: * - name: required. As a temporary Backwards Compatibility layer right now, * a 'field_name' property can be accepted in place of 'id'. * - entity_type: required. * - type: required. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_storage_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:265
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:293/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:320
/** * Prepares saving a new field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:350
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:376/** * Prepares saving an updated field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:397
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:421/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:479/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:505/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:512/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:519/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:527/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:547/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:554/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:568/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:582/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:601/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:609/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:617/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:624/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:632/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:640/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:647/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:654/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:661/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:678/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:686/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:713/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:721/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:728/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:736/** * Determines whether a field has any data. * * @return bool * TRUE if the field has data for any entity; FALSE otherwise. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:746
/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:758
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:769/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:776/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:783/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:795/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:806/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:813/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:821/** * Helper to retrieve the field item class. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:828
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:853/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:863/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:870/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:476/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:264
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/** * Gets an array of placeholders for this entity. * * Individual entity classes may override this method to add additional * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @param string $rel * The link relationship type, for example: canonical or edit-form. * * @return array * An array of URI placeholders. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:294
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:464/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldStorageConfigInterface|null * The field config entity if one exists for the provided field name, * otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:846
/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.webform
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.webform
/** * Constructs a FieldStorageConfig object. * * In most cases, Field entities are created via * FieldStorageConfig::create($values)), where $values is the same parameter * as in this constructor. * * @param array $values * An array of field properties, keyed by property name. Most array * elements will be used to set the corresponding properties on the class; * see the class property documentation for details. Some array elements * have special meanings and a few are required. Special elements are: * - name: required. As a temporary Backwards Compatibility layer right now, * a 'field_name' property can be accepted in place of 'id'. * - entity_type: required. * - type: required. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_storage_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:265
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:293/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:320
/** * Prepares saving a new field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:350
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:376/** * Prepares saving an updated field definition. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The entity storage. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:397
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:421/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:479/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:505/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:512/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:519/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:527/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:547/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:554/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:568/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:582/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:601/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:609/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:617/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:624/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:632/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:640/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:647/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:654/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:661/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:678/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:686/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:713/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:721/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:728/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:736/** * Determines whether a field has any data. * * @return bool * TRUE if the field has data for any entity; FALSE otherwise. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:746
/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:758
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:769/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:776/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:783/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:795/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:806/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:813/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:821/** * Helper to retrieve the field item class. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:828
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:853/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:863/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:870/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:476/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:264
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/** * Gets an array of placeholders for this entity. * * Individual entity classes may override this method to add additional * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @param string $rel * The link relationship type, for example: canonical or edit-form. * * @return array * An array of URI placeholders. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:294
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:464/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldStorageConfigInterface|null * The field config entity if one exists for the provided field name, * otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldStorageConfig.php:846
/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:48/** * Sets the definition of the referenced data. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The target definition to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:60
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * Creates a new data reference definition. * * @param string $target_data_type * The data type of the referenced data. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php:37/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/** * Gets the definition of the referenced entity. * * @return \Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface * The reference target's definition. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:51
/** * Checks whether the target entity has not been saved yet. * * @return bool * TRUE if the entity is new, FALSE otherwise. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:61
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:69/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:83/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:95/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php:122/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataReferenceBase
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataReferenceBase.php:36/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:119/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:138/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/webform/src/Plugin/Field/FieldType/WebformEntityReferenceItem.php:100/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/webform/src/Plugin/Field/FieldType/WebformEntityReferenceItem.php:114/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:213/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:228/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:272/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:302/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:316/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:442/** * Determines whether the item holds an unsaved entity. * * This is notably used for "autocreate" widgets, and more generally to * support referencing freshly created entities (they will get saved * automatically as the hosting entity gets saved). * * @return bool * TRUE if the item holds an unsaved entity. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:533
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:649/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:656/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:663/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:60/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:81/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:88/** * Returns the array of field settings. * * @return array * The array of settings. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:98
/** * Returns the value of a field setting. * * @param string $setting_name * The setting name. * * @return mixed * The setting value. */ Inherited from Drupal\Core\Field\FieldItemBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:111
/**
* {@inheritdoc}
*
* Different to the parent Map class, we avoid creating property objects as
* far as possible in order to optimize performance. Thus we just update
* $this->values if no property object has been created yet.
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:135/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:150/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:186/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:218/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:104/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:163/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:176/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:187/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\Map Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:214
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\Map
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php:241/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/webform/src/Plugin/Field/FieldType/WebformEntityReferenceItem.php:32/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/webform/src/Plugin/Field/FieldType/WebformEntityReferenceItem.php:41/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/webform/src/Plugin/Field/FieldType/WebformEntityReferenceItem.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/modules/contrib/webform/src/Plugin/Field/FieldType/WebformEntityReferenceItem.php:107/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:58/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:116/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:159/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:334/** * Gets a bundle for a given entity type and selection options. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type. * @param array $selection_settings * An array of selection settings. * * @return string|null * Either the bundle string, or NULL if there is no bundle. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:400
/** * Form element validation handler; Invokes selection plugin's validation. * * @param array $form * The form where the settings form is being included in. * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:517
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:540/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:580/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:590/** * Render API callback: Processes the field settings form. * * @see static::fieldSettingsForm() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:699
/** * Adds the field settings to AJAX form elements. * * @see static::fieldSettingsAjaxProcess() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:709
/** * Render API callback that moves entity reference elements up a level. * * The elements (i.e. 'handler_settings') are moved for easier processing by * the validation and submission handlers. * * @see _entity_reference_field_settings_process() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:732
/** * Submit handler for the non-JS case. * * @see static::fieldSettingsForm() */ Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:744
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:781/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:247/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:254/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:261/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:268/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:49/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:68/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:166/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php:753/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:25/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:32/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:39/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:53/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:223/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:275/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:282/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemBase.php:289/** * Defines field item properties. * * Properties that are required to constitute a valid, non-empty item should * be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired(). * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of property definitions of contained properties, keyed by * property name. * * @see \Drupal\Core\Field\BaseFieldDefinition */ Inherited from Drupal\Core\Field\FieldItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:35
/**
* Returns the schema for the field.
*
* This method is static because the field schema information is needed on
* creation of the field. FieldItemInterface objects instantiated at that
* time are not reliable as field settings might be missing.
*
* Computed fields having no schema should return an empty array.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition
* The field definition.
*
* @return array
* An empty array if there is no schema, or an associative array with the
* following key/value pairs:
* - columns: An array of Schema API column specifications, keyed by column
* name. The columns need to be a subset of the properties defined in
* propertyDefinitions(). The 'not null' property is ignored if present,
* as it is determined automatically by the storage controller depending
* on the table layout and the property definitions. It is recommended to
* avoid having the column definitions depend on field settings when
* possible. No assumptions should be made on how storage engines
* internally use the original column name to structure their storage.
* - unique keys: (optional) An array of Schema API unique key definitions.
* Only columns that appear in the 'columns' array are allowed.
* - indexes: (optional) An array of Schema API index definitions. Only
* columns that appear in the 'columns' array are allowed. Those indexes
* will be used as default indexes. Field definitions can specify
* additional indexes or, at their own risk, modify the default indexes
* specified by the field-type module. Some storage engines might not
* support indexes.
* - foreign keys: (optional) An array of Schema API foreign key
* definitions. Note, however, that the field data is not necessarily
* stored in SQL. Also, the possible usage is limited, as you cannot
* specify another field as related, only existing SQL tables,
* such as {taxonomy_term_data}.
*
* @throws \Drupal\Core\Field\FieldException
* Throws an exception if the schema is invalid.
*/
Inherited from Drupal\Core\Field\FieldItemInterface
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemInterface.php:91/** * Returns the referenceable entity types and bundles. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition for which to retrieve the referenceable entity * types and bundles. * * @return array * An array of referenceable bundles where the array is keyed by the entity * type ID, with values an array of bundle names. (It is a single-value * array with the entity type ID if the entity type does not implement * bundles.) */ Inherited from Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface Defined in <drupal>/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItemInterface.php:28
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:16/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:26/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\EntityReferenceFieldItemList
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:107/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:40/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:47/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:56/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:63/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:70/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:77/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:84/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:91/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:113/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:133/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:143/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:152/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:160/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:168/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:187/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:197/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:205/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:212/** * Calls a method on each FieldItem. * * Any argument passed will be forwarded to the invoked method. * * @param string $method * The name of the method to be invoked. * * @return array * An array of results keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:241/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:249/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:286/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:304/** * Returns the widget object used in default value form. * * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the (entire) configuration form. * * @return \Drupal\Core\Field\WidgetInterface|null * A Widget object or NULL if no widget is available. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:348
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:399/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:445/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:41/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:90/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:102/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:112/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:134/** * Renumbers the items in the list. * * @param int $from_index * Optionally, the index at which to start the renumbering, if it is known * that items before that can safely be skipped (for example, when removing * an item at a given index). */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:154
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:167/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:189/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:196/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:209/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:229/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:236/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:243/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:250/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:268/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:290/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:300
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <drupal>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:310/** * Constructs a TypedData object given its definition and context. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * (optional) The name of the created property, or NULL if it is the root * of a typed data tree. Defaults to NULL. * @param \Drupal\Core\TypedData\TypedDataInterface $parent * (optional) The parent object of the data property, or NULL if it is the * root of a typed data tree. Defaults to NULL. * * @see \Drupal\Core\TypedData\TypedDataManager::create() */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:73/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:80/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:87/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:131/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:147/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:155/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:162/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:173/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:195/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Translates a string to the current language or to a given language. * * See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for * important security information and usage guidelines. * * In order for strings to be localized, make them available in one of the * ways supported by the * @link https://www.drupal.org/node/322729 Localization API @endlink. When * possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait * $this->t(). Otherwise create a new * \Drupal\Core\StringTranslation\TranslatableMarkup object. * * @param string $string * A string containing the English text to translate. * @param array $args * (optional) An associative array of replacements to make after * translation. Based on the first character of the key, the value is * escaped and/or themed. See * \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for * details. * @param array $options * (optional) An associative array of additional options, with the following * elements: * - 'langcode' (defaults to the current language): A language code, to * translate to a language other than what is used to display the page. * - 'context' (defaults to the empty context): The context the source * string belongs to. See the * @link i18n Internationalization topic @endlink for more information * about string contexts. * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * An object that, when cast to a string, returns the translated string. * * @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat() * @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() * * @ingroup sanitization */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
/** * Formats a string containing a count of items. * * @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural() * * @return \Drupal\Core\StringTranslation\PluralTranslatableMarkup * An object that, when cast to a string, returns the translated string. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:83
/** * Returns the number of plurals supported by a given language. * * @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals() * * @return int * The number of plurals supported. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:95
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:109
/** * Sets the string translation service to use. * * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation service. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:125
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\TypedData Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/EntityReferenceFieldItemList.php:62/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedData.php:46/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldItemList.php:3352023-02-02T12:07:34+00:00
2023-03-16T11:00:18+00:00
2023-03-16T11:01:13+00:00
2023-02-02T12:06:46+00:00
2023-03-16T11:00:36+00:00
2023-03-16T11:01:40+00:00
2023-03-16T11:01:40+00:00
2024-01-21T13:29:53+00:00
2023-03-16T11:01:08+00:00
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
| options | configurable | |
|---|---|---|
| view | array (1) | true |
| form | array (2) | true |
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36config:domain.config.temporada_grandvaliraresorts_com.core.base_field_override.node.webform.title
config:domain.config.temporada_grandvaliraresorts_com.es.core.base_field_override.node.webform.title
/** * Constructs a BaseFieldOverride object. * * In most cases, base field override entities are created via * BaseFieldOverride::createFromBaseFieldDefinition($definition, 'bundle') * * @param array $values * An array of base field bundle override properties, keyed by property * name. The field to override is specified by referring to an existing * field with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the bundle field override is attached to. Other array * elements will be used to set the corresponding properties on the class; * see the class property documentation for details. * @param string $entity_type * (optional) The type of the entity to create. Defaults to * 'base_field_override'. * * @throws \Drupal\Core\Field\FieldException * Exception thrown if $values does not contain a field_name, entity_type or * bundle value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:106
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:130/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:137/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:144/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:151/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:158/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:165/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:172/** * Gets the base field definition. * * @return \Drupal\Core\Field\BaseFieldDefinition * An associative array of the base field definition. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:182
/**
* {@inheritdoc}
*
* @throws \Drupal\Core\Field\FieldException
* If the bundle is being changed.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:196/** * Implements the magic __sleep() method. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:267
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:235/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:275/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:264
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/** * Gets an array of placeholders for this entity. * * Individual entity classes may override this method to add additional * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @param string $rel * The link relationship type, for example: canonical or edit-form. * * @return array * An array of URI placeholders. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:294
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/** * Creates a base field override object. * * @param \Drupal\Core\Field\BaseFieldDefinition $base_field_definition * The base field definition to override. * @param string $bundle * The bundle to which the override applies. * * @return \Drupal\Core\Field\Entity\BaseFieldOverride * A new base field override object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:75
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:231/** * Loads a base field bundle override config entity. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\Core\Field\FieldConfigInterface|null * The base field bundle override config entity if one exists for the * provided field name, otherwise NULL. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:260
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36config:domain.config.temporada_grandvaliraresorts_com.core.base_field_override.node.webform.promote
config:domain.config.temporada_grandvaliraresorts_com.es.core.base_field_override.node.webform.promote
/** * Constructs a BaseFieldOverride object. * * In most cases, base field override entities are created via * BaseFieldOverride::createFromBaseFieldDefinition($definition, 'bundle') * * @param array $values * An array of base field bundle override properties, keyed by property * name. The field to override is specified by referring to an existing * field with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the bundle field override is attached to. Other array * elements will be used to set the corresponding properties on the class; * see the class property documentation for details. * @param string $entity_type * (optional) The type of the entity to create. Defaults to * 'base_field_override'. * * @throws \Drupal\Core\Field\FieldException * Exception thrown if $values does not contain a field_name, entity_type or * bundle value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:106
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:123/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:130/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:137/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:144/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:151/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:158/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:165/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:172/** * Gets the base field definition. * * @return \Drupal\Core\Field\BaseFieldDefinition * An associative array of the base field definition. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:182
/**
* {@inheritdoc}
*
* @throws \Drupal\Core\Field\FieldException
* If the bundle is being changed.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:196/** * Implements the magic __sleep() method. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:267
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:235/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:275/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:264
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/** * Gets an array of placeholders for this entity. * * Individual entity classes may override this method to add additional * placeholders if desired. If so, they should be sure to replicate the * property caching logic. * * @param string $rel * The link relationship type, for example: canonical or edit-form. * * @return array * An array of URI placeholders. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:294
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/** * Creates a base field override object. * * @param \Drupal\Core\Field\BaseFieldDefinition $base_field_definition * The base field definition to override. * @param string $bundle * The bundle to which the override applies. * * @return \Drupal\Core\Field\Entity\BaseFieldOverride * A new base field override object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:75
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:231/** * Loads a base field bundle override config entity. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\Core\Field\FieldConfigInterface|null * The base field bundle override config entity if one exists for the * provided field name, otherwise NULL. */ Defined in <drupal>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:260
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
Specifies the action that should be used when the redirect path is invalid or empty.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
Specifies the action that should be used when the redirect path is invalid or empty.
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129/** * Gets the untranslated string value stored in this translated string. * * @return string * The string stored in this wrapper. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:145
/** * Gets a specific option from this translated string. * * @param string $name * Option name. * * @return mixed * The value of this option or empty string of option is not set. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <drupal>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:227
/** * Implements the magic __toString() method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * Returns a representation of the object for use in JSON serialization. * * @return string * The safe string content. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:97
/** * For test purposes, wrap die() in an overridable method. */ Defined in <drupal>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/**
* Replaces placeholders in a string with values.
*
* For convenience examples are listed here. Refer to the parameter
* description for $args for details of the placeholders "@", "%", and ":".
*
* Secure examples.
* @code
* // Return the HTML string "Prefix $some_variable".
* $this->placeholderFormat('Prefix @foo', ['@foo' => $some_variable]);
* // Convert an object to a sanitized string.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => (string) $safe_string_interface_object]);
* // Wrap $some_variable in an <em> tag.
* $this->placeholderFormat('Prefix %foo', ['%foo' => $some_variable]);
* // The following are using the : placeholder inside an HTML tag.
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo" title="static text">link text</a>', [':foo' => $some_variable]);
* $this->placeholderFormat('<a href=":foo">link text</a>', [':foo' => $some_variable]);
* // Use a : placeholder inside an HTML tag.
* $this->placeholderFormat('<img src=":foo" />', [':foo' => '/image.png']);
* @endcode
* The above are typical examples of using the placeholders correctly.
*
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>', ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>', ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
* These are the more common mistakes that can be made. Make sure that your
* site is not using any insecure usages of these placeholders.
*
* @param string $string
* A string containing placeholders. The string itself is expected to be
* safe and correct HTML. Any unsafe content must be in $args and inserted
* via placeholders. It is insecure to use the @ or % placeholders within
* the "<" and ">" of an HTML tag.
* @param array $args
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: Use as the default choice for anything displayed on the
* site. Do not use within the "<" and ">" of an HTML tag, such as in
* HTML attribute values. Doing so is a security risk.
* - %variable: Use when @variable would be appropriate, but you want the
* placeholder value to be wrapped in an <em> tag with a placeholder
* class. As with @variable, do not use within the "<" and ">" of an HTML
* tag, such as in HTML attribute values. Doing so is a security risk.
* - :variable: Use when the return value is to be used as a URL value of an
* HTML attribute. Only the "href" attribute is supported. The return
* value is escaped with
* \Drupal\Component\Utility\Html::escape() and filtered for dangerous
* protocols using UrlHelper::stripDangerousProtocols(). Use this when
* using the "href" attribute, ensuring the value is always wrapped in
* quotes.
*
* @return string
* A formatted HTML string with the placeholders replaced.
*
* @ingroup sanitization
*
* @see \Drupal\Core\StringTranslation\TranslatableMarkup
* @see \Drupal\Core\StringTranslation\PluralTranslatableMarkup
* @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()
* @see \Drupal\Core\Url::fromUri()
*/
Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:175/** * Escapes a placeholder replacement value if needed. * * @param string|\Drupal\Component\Render\MarkupInterface $value * A placeholder replacement value. * * @return string * The properly escaped replacement value. */ Defined in <drupal>/core/lib/Drupal/Component/Render/FormattableMarkup.php:237
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85/** * Gets the label of the field type. * * If the label hasn't been set, then fall back to the label of the * typed data definition. * * @return string * The label of the field type. * * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
/** * Constructs a new data definition object. * * @param array $values * (optional) If given, an array of initial values to set on the definition. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53/** * Sets the data type. * * @param string $type * The data type to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217/** * Sets the array of settings, as required by the used class. * * @param array $settings * The array of settings. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238/** * Sets a definition setting. * * @param string $setting_name * The definition setting to set. * @param mixed $value * The value to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:383/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:28/** * Creates a new field item definition. * * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition the item definition belongs to. * * @return static */ Defined in <drupal>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110/** * Sets the field name. * * @param string $name * The field name to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194/** * Sets the name of the provider of this field. * * @param string $provider * The provider name to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214/** * Sets whether the field is translatable. * * @param bool $translatable * Whether the field is translatable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235/** * Sets whether the field is revisionable. * * @param bool $revisionable * Whether the field is revisionable. * * @return $this * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258/** * Sets the maximum number of items allowed for the field. * * Possible values are positive integers or * FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. * * Note that if the entity type that this base field is attached to is * revisionable and the field has a cardinality higher than 1, the field is * considered revisionable by default. * * @param int $cardinality * The field cardinality. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286/** * 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\BaseFieldDefinition::addPropertyConstraints() * * @param string $name * The name of the property to set constraints for. * @param array $constraints * The constraints to set. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345/** * Sets the display options for the field in forms or rendered entities. * * This enables generic rendering of the field with widgets / formatters, * including automated support for "In place editing", and with optional * configurability in the "Manage display" / "Manage form display" UI screens. * * Unless this method is called, the field remains invisible (or requires * ad-hoc rendering logic). * * @param string $display_context * The display context. Either 'view' or 'form'. * @param array $options * An array of display options. Refer to * \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for * a list of supported keys. The options should include at least a 'weight', * or specify 'region' = 'hidden'. The 'default_widget' / * 'default_formatter' for the field type will be used if no 'type' is * specified. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
/** * Sets whether the display for the field can be configured. * * @param string $display_context * The display context. Either 'view' or 'form'. * @param bool $configurable * Whether the display options can be configured (e.g., via the "Manage * display" / "Manage form display" UI screens). If TRUE, the options * specified via getDisplayOptions() act as defaults. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476/** * Returns the initial value for the field. * * @return array * The initial value for the field, as a numerically indexed array of items, * each item being a property/value array. An empty array when there is no * default value. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:492
/** * Sets an initial value for the field. * * @param mixed $value * The initial value for the field. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:511
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:528
/** * Sets a field that will be used for getting initial values. * * @param string $field_name * The name of the field that will be used for getting initial values. * @param mixed $default_value * (optional) The default value for the field, in case the inherited value * is NULL. This can be either: * - a literal, in which case it will be assigned to the first property of * the first item; * - a numerically indexed array of items, each item being a property/value * array; * - a non-numerically indexed array, in which case the array is assumed to * be a property/value array and used as the first item; * - an empty array for no initial value. * If the field being added is required or an entity key, it is recommended * to provide a default value. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:552
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:576/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:588/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:599/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:606/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:614/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:624/** * Sets the ID of the type of the entity this field is attached to. * * @param string $entity_type_id * The name of the target entity type to set. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:636
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:644/** * Sets the bundle this field is defined for. * * @param string|null $bundle * The bundle, or NULL if the field is not bundle-specific. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:656
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:664/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:691/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:699/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:706/** * Sets the storage behavior for this field. * * @param bool $custom_storage * Pass FALSE if the storage takes care of storing the field, * TRUE otherwise. * * @return $this * * @throws \LogicException * Thrown if custom storage is to be set to FALSE for a computed field. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:722
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:733/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:740/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:747/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:760/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:772
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:780/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:791/** * Sets whether the field storage is required. * * @param bool $required * Whether the field storage is required. * * @return static * The object itself for chaining. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:809
/** * Magic method: Implements a deep clone. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:817
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:834/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92/** * Sets the item definition. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * A list item's data definition. * * @return $this */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74/** * Sets the human-readable label. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95/** * Sets the human-readable description. * * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123/** * Sets whether the data is read-only. * * @param bool $read_only * Whether the data is read-only. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148/** * Sets whether the data is computed. * * @param bool $computed * Whether the data is computed. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169/** * Sets whether the data is required. * * @param bool $required * Whether the data is required. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * Sets the class used for creating the typed data object. * * @param string|null $class * The class to use. * * @return static * The object itself for chaining. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283/** * Sets an array of validation constraints. * * @param array $constraints * An array of validation constraint definitions, keyed by constraint name. * Each constraint definition can be used for instantiating * \Symfony\Component\Validator\Constraint objects. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:306/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345/**
* {@inheritdoc}
*
* This is for BC support only.
*
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356/** * Returns all definition values as array. * * @return array * The array holding values for all definition keys. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:366
/** * Sets the whether the data value should be internal. * * @param bool $internal * Whether the data value should be internal. * * @return $this * * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:401
/** * Sets the typed data manager. * * @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager * The typed data manager. * * @return $this */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
/** * Gets the typed data manager. * * @return \Drupal\Core\TypedData\TypedDataManagerInterface * The typed data manager. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <drupal>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
/** * Creates a new field definition based upon a field storage definition. * * In cases where one needs a field storage definitions to act like full * field definitions, this creates a new field definition based upon the * (limited) information available. That way it is possible to use the field * definition in places where a full field definition is required; e.g., with * widgets or formatters. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Creates a new list definition. * * @param string $item_type * The data type of the list items; e.g., 'string', 'integer' or 'any'. * * @return static * A new List Data Definition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:43/** * Creates a new data definition. * * @param string $type * The data type of the data; e.g., 'string', 'integer' or 'any'. * * @return static * A new DataDefinition object. */ Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:28
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/TypedData/DataDefinition.php:36config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.body
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.body
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:450/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:465/** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods * breaks entity forms in PHP 5.4. * * @todo Investigate in https://www.drupal.org/node/1977206. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:478
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:546/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:578/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:585/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:593/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:601/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132/** * Overrides EntityBase::isNew(). * * EntityInterface::enforceIsNew() is only supported for newly created * configuration entities but has no effect after saving, since each * configuration entity is unique. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface * The typed configuration plugin manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:288
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:415/** * Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). * * Note that this function should only be called from implementations of * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(), * as dependencies are recalculated during every entity save. * * @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency() */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:430
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:444/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:458/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:465/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:492/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:514/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:522/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:534/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:541/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:554/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:595/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:602/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:610/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:617/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface * The entity type manager. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:85
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface * The entity type bundle info service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:95
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface * The language manager service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:105
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface * The UUID service. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:115
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:129/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:143/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:152/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:159/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:166/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:253/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:271/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:315/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:337/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:351/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:376/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:408/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:466/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:473/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:483
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:507/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:517/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:628/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:673/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:696/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:703/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:711/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:722/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:734/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:745/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:32/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:42/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:52/** * Sets cacheability; useful for value object constructors. * * @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability * The cacheability to set. * * @return $this */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <drupal>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:73/** * Calculates and returns dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. * * @return array * An array of dependencies keyed by the type of dependency. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Calculates and adds dependencies of a specific plugin instance. * * Dependencies are added for the module that provides the plugin, as well * as any dependencies declared by the instance's calculateDependencies() * method, if it implements * \Drupal\Component\Plugin\DependentPluginInterface. * * @param \Drupal\Component\Plugin\PluginInspectionInterface $instance * The plugin instance. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
/** * Wraps the module handler. * * @return \Drupal\Core\Extension\ModuleHandlerInterface * The module handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
/** * Wraps the theme handler. * * @return \Drupal\Core\Extension\ThemeHandlerInterface * The theme handler. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Adds a dependency. * * @param string $type * Type of dependency being added: 'module', 'theme', 'config', 'content'. * @param string $name * If $type is 'module' or 'theme', the name of the module or theme. If * $type is 'config' or 'content', the result of * EntityInterface::getConfigDependencyName(). * * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName() * * @return $this */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * [ * 'module' => [ * 'node', * 'field', * 'image', * ], * ]; * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <drupal>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31/** * Returns the typed data class name for this entity. * * @return string * The string representing the typed data class name. * * @see \Drupal\Core\Entity\Plugin\DataType\EntityAdapter */ Inherited from Drupal\Core\Entity\EntityBase Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:644
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:211/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:237/** * Loads a field config entity based on the entity type and field name. * * @param string $entity_type_id * ID of the entity type. * @param string $bundle * Bundle name. * @param string $field_name * Name of the field. * * @return \Drupal\field\FieldConfigInterface|null * The field config entity if one exists for the provided field * name, otherwise NULL. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:379
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500/** * Callback for uasort() to sort configuration entities by weight and label. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:238
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:502/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:588
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:435/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:460/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:524/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:534/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:544/** * Ensure a field value is transformed into a format keyed by delta. * * @param mixed $value * The raw field value to normalize. * @param string $main_property_name * The main field property name. * * @return array * A field value normalized into a format keyed by delta. */ Defined in <drupal>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:295/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:561/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:453/**
* {@inheritdoc}
*/
Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:447/** * Invalidates an entity's cache tags upon delete. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * @param \Drupal\Core\Entity\EntityInterface[] $entities * An array of entities. */ Defined in <drupal>/core/lib/Drupal/Core/Entity/EntityBase.php:582
config:domain.config.temporada_grandvaliraresorts_com.field.field.node.webform.field_domain_access
config:domain.config.temporada_grandvaliraresorts_com.es.field.field.node.webform.field_domain_access
/** * Constructs a FieldConfig object. * * In most cases, Field entities are created via * FieldConfig::create($values), where $values is the same * parameter as in this constructor. * * @param array $values * An array of field properties, keyed by property name. The * storage associated with the field can be specified either with: * - field_storage: the FieldStorageConfigInterface object, * or by referring to an existing field storage in the current configuration * with: * - field_name: The field name. * - entity_type: The entity type. * Additionally, a 'bundle' property is required to indicate the entity * bundle to which the field is attached to. Other array elements will be * used to set the corresponding properties on the class; see the class * property documentation for details. * @param string $entity_type * (optional) The entity type on which the field should be created. * Defaults to "field_config". */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:110
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:143/** * Overrides \Drupal\Core\Entity\EntityBase::preSave(). * * @throws \Drupal\Core\Field\FieldException * If the field definition is invalid. * @throws \Drupal\Core\Entity\EntityStorageException * In case of failures at the configuration storage level. */ Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:165
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:201/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:264/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:280/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:291/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:298/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:332/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:339/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:347/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:354/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/field/src/Entity/FieldConfig.php:361/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:200/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:207/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:214/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:221/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:228/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:262/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:310/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:324/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:332/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:340/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:348/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:356/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:365/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:373/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:381/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:401/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:409/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:417/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:425/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <drupal>/core/lib/Drupal/Core/Field/FieldConfigBase.php:442/*