Downloads
Document
Spustitelná verze pro Windows
Document
Spustitelná verze pro GNU/Linux
2019-07-26 10:09:36 UTC
2017-04-18 08:20:25 UTC
2019-07-26 10:09:36 UTC
<h2>Úvod</h2> <p>Některé funkcionality zatím chybí, autoři ale pracují na vývoji. <strong>Je tedy pravděpodobné, že se místy objeví chyby.</strong> Pokud byste tedy měli nějakou připomínku, můžete ji poslat na kontaktní adresu. Po odladění softwaru uvolníme celé zdrojové kódy pod otevřenou licencí.</p> <h2>Návod</h2> <p>Program bude velmi pravděpodobně fungovat také na jiných konfiguracích.</p> <ul> <li>Operační systém: Windows XP Service Pack 3 nebo vyšší; Linux Ubuntu 16.04 nebo vyšší</li> <li>Procesor: Windows verze - Intel Pentium Pro a novější, Linux verze - jakýkoli x86-64 procesor.</li> <li>.NET Framework: ekvivalent verze 2.0</li> </ul> <h3>Instalace</h3> <ol> <li>Stáhněte si v sekci Ke stažení archiv se spustitelnou verzí.</li> <li>Stažený soubor rozbalte na vhodné místo v počítači. Ve složce vybalené z archivu naleznete soubor <em>nxc4ev3-gui.exe</em>. Jedná se o okénkové rozhraní. Můžete jej spouštět přímo a nebo si na něj můžete vytvořit odkaz.</li> </ol> <h3>Použití</h3> <ol> <li>Otevřete program NXC4EV3 GUI. Vyberte zdrojový soubor v jazyce NXC pomocí tlačítka vedle pole pro „NXC file“. „Resource dir“ se doplní automaticky. Pro editaci zdrojových kódů třeba používat např. původní <a href="http://bricxcc.sourceforge.net/">Bricx Control Center</a>, NXC4EV3 se stará pouze o kompatibilitu s EV3.</li> <li>Pro sestavení klepněte na „Compile“. Pokud překlad proběhl bez problémů, můžete pokračovat dále.</li> <li>Pro nahrátí na EV3 kostku klepněte na „Upload“. Kostka musí být k počítači připojena přes USB. Pokud nahrátí bylo úspěšné, program naleznete na kostce v adresáři, který se jmenuje dle vstupního NXC souboru.</li> </ol> <p>Poznámka: při sestavení se vytváří dočasné soubory, které po nahrátí nejsou potřeba. Jedná se o koncovky <em>.c</em>, <em>.dl</em>, <em>.elf</em> a <em>.rbf</em>.</p> <h2>Technické detaily</h2> <p>Software pracuje na principu překladu z jazyka NXC do jazyka C a následné kompilaci do nativního kódu. Program starající se o překlad jsme nazvali NXC2CC a je napsán v C++11/C++14. Překlad probíhá v několika etapách. V první etapě je vstupní NXC soubor lexikálně analyzován pomocí upraveného <a href="http://boost-spirit.com/repository/applications/show_contents.php">slexu</a>. Hned poté zpracován knihovnou <a href="http://www.boost.org/doc/libs/1_58_0/libs/wave/">Boost::Wave</a>, která funguje jako preprocesor. Většina obslužného kódu je založena na příkladu <em>cpp_tokens</em> z téže knihovny. Druhá etapa je syntaktická a sémantická analýza. Pro tento účel je použit vlastní rekurzivně-sestupný parser napsaný podle přizpůsobené syntaxe C89. Jak parser prochází tokeny z předchozí etapy a sestavuje parsovací strom, průběžně vzniká také tabulky symbolů. Na tu je pak často ukazováno z parsovacího stromu. Třetí etapa provádí opak předchozích dvou, z parsovacího stromu přímo zapisuje odpovídající zdrojový kód v jazyce C. Tím končí práce programu NXC2CC. Výstupný soubor se nedá použít osamoceně, je k němu potřeba podpůrná knihovna NXClib (ta je součástí projektu).</p> <p>NXClib sestává ze tří částí: z maker zjednodušující výstup z NXC2CC, z API hlaviček pro NXC2CC a z implementace API pro C kompilátor. Implementace API využívá už existujícího projektu <a href="https://c4ev3.github.io/">C4EV3</a>.</p> <p>Ze stejného projektu je odvozeno i pokračování procesu. Pro kompilaci do nativního kódu je využito GCC z Sourcery G++ Lite 2009q1-203 (<a href="https://sourcery.mentor.com/GNUToolchain/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-mingw32.tar.bz2">Win32</a>, <a href="https://sourcery.mentor.com/GNUToolchain/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2">Linux</a>, <a href="https://sourcery.mentor.com/GNUToolchain/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi.src.tar.bz2">zdrojové kódy</a>). Autor se domnívá, že stejný kompilátor byl použit i pro firmware EV3. Z kompilátoru se získává spustitelný soubor pro Linux na kostce.</p> <p>Závěrečnou etapou je nahrátí na kostku. Využit je program <a href="https://github.com/c4ev3/ev3duder">ev3duder</a>, také z C4EV3. Nejprve je jím třeba vytvořit soubor RBF, který je spustitelný v EV3 VM a na koste se zobrazí jako program. Pak jím zbývá nahrát oba soubory na EV3 kostku.</p> <p>NXC4EV3 GUI je grafická nadstavba, která popsaný proces automatizuje a skrývá od <em>běžného</em> uživatele.</p> <h2>Kontakt</h2> <p>Jakub Vaněk<br /> E-mail: <a href="mailto:lego-sw@vankovi.net">lego-sw@vankovi.net</a></p>
Rádi bychom vám představili software, který je od školního roku 2016/2017 vytvářen ve spolupráci s naší katedrou. Jedná se o nástroj pro spouštění programů napsaných v programovacím jazyce NXC na Lego Mindstorms EV3. Cílem projektu je použití shodných zdrojových kódů pro NXT a EV3.
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
options | configurable | |
---|---|---|
view | array (1) | true |
form | array (2) | true |
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * Implements the magic __toString() method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
/** * 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", array('@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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:158
/** * Gets all options from this translated string. * * @return mixed[] * The array of options. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
/** * Gets all arguments from this translated string. * * @return mixed[] * The array of arguments. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
/** * Renders the object as a string. * * @return string * The translated string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
/** * Magic __sleep() method to avoid serializing the string translator. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
/** * Returns the string length. * * @return int * The length of the string. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
/** * 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 <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:120
/** * For test purposes, wrap die() in an overridable method. */ Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
/** * Gets the string translation service. * * @return \Drupal\Core\StringTranslation\TranslationInterface * The string translation service. */ Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:213
/** * Replaces placeholders in a string with values. * * @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. * @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. * Null args[] values are deprecated in Drupal 9.5 and will fail in * Drupal 11.0. The 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: When the placeholder replacement value is: * - A string, the replaced value in the returned string will be sanitized * using \Drupal\Component\Utility\Html::escape(). * - A MarkupInterface object, the replaced value in the returned string * will not be sanitized. * - A MarkupInterface object cast to a string, the replaced value in the * returned string be forcibly sanitized using * \Drupal\Component\Utility\Html::escape(). * @code * $this->placeholderFormat('This will force HTML-escaping of the replacement value: @text', ['@text' => (string) $safe_string_interface_object)); * @endcode * Use this placeholder as the default choice for anything displayed on * the site, but not within HTML attributes, JavaScript, or CSS. Doing so * is a security risk. * - %variable: Use when the replacement value is to be wrapped in <em> * tags. * A call like: * @code * $string = "%output_text"; * $arguments = ['%output_text' => 'text output here.']; * $this->placeholderFormat($string, $arguments); * @endcode * makes the following HTML code: * @code * <em class="placeholder">text output here.</em> * @endcode * As with @variable, do not use this within HTML attributes, JavaScript, * or CSS. Doing so is a security risk. * - :variable: 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 attribute value is always * wrapped in quotes: * @code * // Secure (with quotes): * $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, '@variable' => $variable]); * // Insecure (without quotes): * $this->placeholderFormat('<a href=:url>@variable</a>', [':url' => $url, '@variable' => $variable]); * @endcode * When ":variable" comes from arbitrary user input, the result is secure, * but not guaranteed to be a valid URL (which means the resulting output * could fail HTML validation). To guarantee a valid URL, use * Url::fromUri($user_input)->toString() (which either throws an exception * or returns a well-formed URL) before passing the result into a * ":variable" placeholder. * * @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() */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:196
/** * 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. */ Inherited from Drupal\Component\Render\FormattableMarkup Defined in <ROOT>/core/lib/Drupal/Component/Render/FormattableMarkup.php:269
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:57
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:64
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:71
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:78
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:359
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:369
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:179
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
/** * {@inheritdoc} */ Defined in <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:411
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:418
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:425
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:432
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:439
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:456
/** * {@inheritdoc} */ Defined in <ROOT>/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 (array() for no default value). */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
/** * Returns the name of the field that will be used for getting initial values. * * @return string|null * The field name. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:560
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:575
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:587
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:598
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:605
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:613
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:732
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:739
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
/** * Sets whether the field storage is deleted. * * @param bool $deleted * Whether the field storage is deleted. * * @return $this */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
/** * Magic method: Implements a deep clone. */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
/** * 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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:270
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:285
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:293
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:305
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:332
/** * {@inheritdoc} * * This is for BC support only. * @todo: Remove in https://www.drupal.org/node/1928868. */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:343
/** * Returns all definition values as array. * * @return array */ Inherited from Drupal\Core\TypedData\DataDefinition Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:352
/** * 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 <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:387
/** * Creates a new field definition. * * @param string $type * The type of the field. * * @return static * A new field definition object. */ Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:101
/** * {@inheritdoc} */ Inherited from Drupal\Core\TypedData\ListDataDefinition Defined in <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:97
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:130
/** * Overrides \Drupal\Core\Entity\Entity::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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:152
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:188
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:288
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:295
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:329
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:336
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:344
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:351
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:358
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:227
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:287
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:301
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:308
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:316
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:323
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:331
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:339
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:347
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:354
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:362
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:374
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:382
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:414
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:421
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:436
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:448
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:501
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:508
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:516
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:540
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:547
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:555
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:563
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:576
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:591
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:122
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:129
/** * Overrides Entity::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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:146
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:153
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:160
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:177
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:184
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:191
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:245
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:435
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:449
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:456
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:504
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:512
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:524
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:531
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:544
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:585
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:592
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:600
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:607
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:143
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:150
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:306
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:260
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:277
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * 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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * array( * 'module' => array( * 'node', * 'field', * 'image', * ), * ); * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/** * 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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:280
/** * 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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:421
/** * {@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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:483
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:198
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:224
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:376
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:459
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:468
/** * Helper callback for uasort() to sort configuration entities by weight and label. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:231
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:504
/** * 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. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} * * Override to never invalidate the individual entities' cache tags; the * config system already invalidates them. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:493
/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:578
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:97
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:130
/** * Overrides \Drupal\Core\Entity\Entity::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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:152
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:188
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:288
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:295
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:329
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:336
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:344
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:351
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:358
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:227
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:287
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:301
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:308
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:316
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:323
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:331
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:339
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:347
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:354
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:362
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:374
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:382
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:414
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:421
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:436
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:448
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:501
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:508
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:516
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:540
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:547
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:555
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:563
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:576
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:591
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:122
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:129
/** * Overrides Entity::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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:146
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:153
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:160
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:177
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:184
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:191
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:245
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:435
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:449
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:456
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:504
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:512
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:524
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:531
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:544
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:585
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:592
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:600
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:607
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:143
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:150
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:306
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:260
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:277
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * 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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * array( * 'module' => array( * 'node', * 'field', * 'image', * ), * ); * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/** * 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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:280
/** * 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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:421
/** * {@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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:483
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:198
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:224
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:376
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:459
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:468
/** * Helper callback for uasort() to sort configuration entities by weight and label. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:231
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:504
/** * 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. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} * * Override to never invalidate the individual entities' cache tags; the * config system already invalidates them. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:493
/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:578
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:97
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:130
/** * Overrides \Drupal\Core\Entity\Entity::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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:152
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:188
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:288
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:295
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:329
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:336
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:344
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:351
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:358
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:227
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:287
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:301
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:308
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:316
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:323
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:331
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:339
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:347
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:354
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:362
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:374
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:382
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:414
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:421
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:436
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:448
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:501
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:508
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:516
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:540
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:547
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:555
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:563
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:576
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:591
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:122
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:129
/** * Overrides Entity::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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:146
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:153
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:160
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:177
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:184
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:191
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:245
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:435
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:449
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:456
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:504
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:512
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:524
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:531
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:544
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:585
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:592
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:600
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:607
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:143
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:150
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:306
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:260
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:277
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * 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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * array( * 'module' => array( * 'node', * 'field', * 'image', * ), * ); * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/** * 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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:280
/** * 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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:421
/** * {@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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:483
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:198
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:224
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:376
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:459
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:468
/** * Helper callback for uasort() to sort configuration entities by weight and label. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:231
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:504
/** * 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. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} * * Override to never invalidate the individual entities' cache tags; the * config system already invalidates them. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:493
/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:578
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:97
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:130
/** * Overrides \Drupal\Core\Entity\Entity::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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:152
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:188
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:288
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:295
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:329
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:336
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:344
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:351
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:358
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:227
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:287
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:301
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:308
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:316
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:323
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:331
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:339
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:347
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:354
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:362
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:374
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:382
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:414
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:421
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:436
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:448
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:501
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:508
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:516
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:540
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:547
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:555
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:563
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:576
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:591
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:122
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:129
/** * Overrides Entity::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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:146
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:153
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:160
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:177
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:184
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:191
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:245
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:435
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:449
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:456
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:504
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:512
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:524
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:531
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:544
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:585
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:592
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:600
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:607
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:143
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:150
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:306
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:260
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:277
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * 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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * array( * 'module' => array( * 'node', * 'field', * 'image', * ), * ); * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/** * 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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:280
/** * 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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:421
/** * {@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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:483
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:198
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:224
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:376
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:459
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:468
/** * Helper callback for uasort() to sort configuration entities by weight and label. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:231
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:504
/** * 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. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} * * Override to never invalidate the individual entities' cache tags; the * config system already invalidates them. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:493
/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:578
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:97
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:130
/** * Overrides \Drupal\Core\Entity\Entity::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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:152
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:188
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:288
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:295
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:329
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:336
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:344
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:351
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:358
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:227
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:287
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:301
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:308
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:316
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:323
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:331
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:339
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:347
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:354
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:362
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:374
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:382
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:414
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:421
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:436
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:448
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:501
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:508
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:516
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:540
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:547
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:555
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:563
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:576
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:591
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:122
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:129
/** * Overrides Entity::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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:146
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:153
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:160
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:177
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:184
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:191
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:245
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:435
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:449
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:456
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:504
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:512
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:524
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:531
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:544
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:585
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:592
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:600
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:607
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:143
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:150
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:306
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:260
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:277
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * 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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * array( * 'module' => array( * 'node', * 'field', * 'image', * ), * ); * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/** * 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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:280
/** * 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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:421
/** * {@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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:483
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:198
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:224
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:376
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:459
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:468
/** * Helper callback for uasort() to sort configuration entities by weight and label. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:231
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:504
/** * 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. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} * * Override to never invalidate the individual entities' cache tags; the * config system already invalidates them. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:493
/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:578
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:97
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:130
/** * Overrides \Drupal\Core\Entity\Entity::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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:152
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:188
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:288
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:295
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:329
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:336
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:344
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:351
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:358
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:227
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:287
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:301
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:308
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:316
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:323
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:331
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:339
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:347
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:354
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:362
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:374
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:382
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:414
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:421
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:436
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:448
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:501
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:508
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:516
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:540
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:547
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:555
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:563
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:576
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:591
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:122
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:129
/** * Overrides Entity::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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:146
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:153
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:160
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:177
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:184
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:191
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:245
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:435
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:449
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:456
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:504
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:512
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:524
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:531
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:544
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:585
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:592
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:600
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:607
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:143
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:150
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:306
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:260
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:277
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * 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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * array( * 'module' => array( * 'node', * 'field', * 'image', * ), * ); * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/** * 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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:280
/** * 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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:421
/** * {@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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:483
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:198
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:224
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:376
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:459
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:468
/** * Helper callback for uasort() to sort configuration entities by weight and label. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:231
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:504
/** * 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. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} * * Override to never invalidate the individual entities' cache tags; the * config system already invalidates them. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:493
/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:578
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:97
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:130
/** * Overrides \Drupal\Core\Entity\Entity::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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:152
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:188
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:288
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:295
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:329
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:336
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:344
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:351
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:358
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:227
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:261
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:287
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:301
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:308
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:316
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:323
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:331
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:339
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:347
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:354
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:362
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:374
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:382
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:389
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:414
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:421
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:436
/** * 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 <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:448
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:491
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:501
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:508
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:516
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:540
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:547
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:555
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:563
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:576
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:591
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:122
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:129
/** * Overrides Entity::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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:146
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:153
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:160
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:177
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:184
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:191
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:199
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:206
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:213
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:245
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:397
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:406
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:435
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:449
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:456
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:504
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:512
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:524
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:531
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:544
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:585
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:592
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:600
/** * {@inheritdoc} */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:607
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:143
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:150
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:306
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:260
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:277
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
/** * 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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/** * Adds multiple dependencies. * * @param array $dependencies * An array of dependencies keyed by the type of dependency. One example: * @code * array( * 'module' => array( * 'node', * 'field', * 'image', * ), * ); * @endcode * * @see \Drupal\Core\Entity\DependencyTrait::addDependency */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
/** * 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 <ROOT>/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 <ROOT>/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 <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
/** * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:280
/** * 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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:421
/** * {@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 <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:483
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:198
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:224
/** * 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 <ROOT>/core/modules/field/src/Entity/FieldConfig.php:376
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:459
/** * {@inheritdoc} */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:468
/** * Helper callback for uasort() to sort configuration entities by weight and label. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:231
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:504
/** * 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. */ Inherited from Drupal\Core\Field\FieldConfigBase Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/** * {@inheritdoc} * * Override to never invalidate the individual entities' cache tags; the * config system already invalidates them. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:493
/** * Gets the configuration manager. * * @return \Drupal\Core\Config\ConfigManager * The configuration manager. */ Inherited from Drupal\Core\Config\Entity\ConfigEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:578
/** * Constructs a new class instance. * * @param array $values * An array of property values, keyed by property name, used to construct * the language. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:77
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:101
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:108
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:115
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:122
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:129
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:136
/** * Sort language objects. * * @param \Drupal\Core\Language\LanguageInterface[] $languages * The array of language objects keyed by langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:146
/** * Gets the default langcode. * * @return string * The current default langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:173
/** * Constructs a new class instance. * * @param array $values * An array of property values, keyed by property name, used to construct * the language. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:77
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:101
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:108
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:115
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:122
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:129
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:136
/** * Sort language objects. * * @param \Drupal\Core\Language\LanguageInterface[] $languages * The array of language objects keyed by langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:146
/** * Gets the default langcode. * * @return string * The current default langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:173
/** * Constructs a new class instance. * * @param array $values * An array of property values, keyed by property name, used to construct * the language. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:77
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:101
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:108
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:115
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:122
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:129
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:136
/** * Sort language objects. * * @param \Drupal\Core\Language\LanguageInterface[] $languages * The array of language objects keyed by langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:146
/** * Gets the default langcode. * * @return string * The current default langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:173
/** * Constructs a new class instance. * * @param array $values * An array of property values, keyed by property name, used to construct * the language. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:77
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:101
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:108
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:115
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:122
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:129
/** * {@inheritdoc} */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:136
/** * Sort language objects. * * @param \Drupal\Core\Language\LanguageInterface[] $languages * The array of language objects keyed by langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:146
/** * Gets the default langcode. * * @return string * The current default langcode. */ Defined in <ROOT>/core/lib/Drupal/Core/Language/Language.php:173
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/user/src/EntityOwnerTrait.php:48
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/user/src/EntityOwnerTrait.php:55
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/user/src/EntityOwnerTrait.php:65
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/user/src/EntityOwnerTrait.php:73
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:102
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:124
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:139
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:186
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:193
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:201
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:208
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:216
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:223
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:231
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:238
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:246
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:253
/** * Returns the timestamp of the last entity change across all translations. * * @return int * The timestamp of the last entity save operation across all * translations. */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangedTrait.php:17
/** * Gets the timestamp of the last entity change for the current translation. * * @return int * The timestamp of the last entity save operation. */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangedTrait.php:32
/** * Sets the timestamp of the last entity change for the current translation. * * @param int $timestamp * The timestamp of the last entity save operation. * * @return $this */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangedTrait.php:44
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php:47
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php:54
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php:64
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionCreationTime(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:69
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionCreationTime(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:76
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUser(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:84
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUser(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:91
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUserId(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:99
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:106
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:114
/** * Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage(). */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:121
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:189
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:291
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:313
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:320
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:328
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:335
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:348
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:363
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:373
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:383
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:390
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:400
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:407
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:415
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:422
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:429
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:487
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:496
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:503
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:520
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:538
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:545
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:552
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:559
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:566
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:624
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:635
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:648
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:662
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:669
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:681
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:691
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:716
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:782
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:848
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:883
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:934
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:944
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:951
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:972
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1001
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1011
/** * Updates the original values with the interim changes. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1028
/** * Implements the magic method for getting object properties. * * @todo: A lot of code still uses non-fields (e.g. $entity->content in view * builders) by reference. Clean that up. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1048
/** * Implements the magic method for setting object properties. * * Uses default language always. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1075
/** * Implements the magic method for isset(). */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1109
/** * Implements the magic method for unset(). */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1118
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1149
/** * Magic method: Implements a deep clone. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1178
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1264
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1273
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1413
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1472
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:120
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:127
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:136
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:159
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:222
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:240
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:284
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:337
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:345
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:371
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:436
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:457
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:467
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:477
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:559
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:567
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:588
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:633
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:640
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:647
/** * Returns an array of field names to skip when checking for changes. * * @param \Drupal\Core\Entity\ContentEntityInterface $entity * A content entity object. * * @return string[] * An array of field names. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangesDetectionTrait.php:21
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:268
/** * Clear entity translation object cache to remove stale references. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:511
/** * Gets a translated field. * * @return \Drupal\Core\Field\FieldItemListInterface */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:578
/** * Populates the local cache for the default language code. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:738
/** * Updates language for already instantiated fields. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:771
/** * Instantiates a translation object for an existing translation. * * The translated entity will be a clone of the current entity with the * specified $langcode. All translations share the same field data structures * to ensure that all of them deal with fresh data. * * @param string $langcode * The language code for the requested translation. * * @return \Drupal\Core\Entity\EntityInterface * The translation object. The content properties of the translation object * are stored as references to the main entity. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:901
/** * Gets the value of the given entity key, if defined. * * @param string $key * Name of the entity key, for example id, revision or bundle. * * @return mixed * The value of the entity key, NULL if not defined. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1300
/** * Returns an array of field names to skip in ::hasTranslationChanges. * * @return array * An array of field names. */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1402
/** * 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 <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
/** * Gets the entity type manager. * * @return \Drupal\Core\Entity\EntityTypeManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
/** * Gets the entity type bundle info service. * * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
/** * Gets the language manager. * * @return \Drupal\Core\Language\LanguageManagerInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
/** * Gets the UUID generator. * * @return \Drupal\Component\Uuid\UuidInterface */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
/** * Gets an array link templates. * * @return array * An array of link templates containing paths. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:233
/** * 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 <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:263
/** * The list cache tags to invalidate for this entity. * * @return string[] * Set of list cache tags. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:446
/** * Invalidates an entity's cache tags upon save. * * @param bool $update * TRUE if the entity has been updated, or FALSE if it has been inserted. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:517
/** * Returns an array of base field definitions for entity owners. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type to add the owner field to. * * @return \Drupal\Core\Field\BaseFieldDefinition[] * An array of base field definitions. * * @throws \Drupal\Core\Entity\Exception\UnsupportedEntityTypeDefinitionException * Thrown when the entity type does not implement EntityOwnerInterface or * if it does not have an "owner" entity key. */ Defined in <ROOT>/core/modules/user/src/EntityOwnerTrait.php:28
/** * Default value callback for 'owner' base field. * * @return mixed * A default value for the owner field. */ Defined in <ROOT>/core/modules/user/src/EntityOwnerTrait.php:86
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:162
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:178
/** * {@inheritdoc} */ Defined in <ROOT>/core/modules/node/src/Entity/Node.php:261
/** * Returns an array of base field definitions for publishing status. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type to add the publishing status field to. * * @return \Drupal\Core\Field\BaseFieldDefinition[] * An array of base field definitions. * * @throws \Drupal\Core\Entity\Exception\UnsupportedEntityTypeDefinitionException * Thrown when the entity type does not implement EntityPublishedInterface * or if it does not have a "published" entity key. */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php:27
/** * Provides revision-related base field definitions for an entity type. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * * @return \Drupal\Core\Field\FieldDefinitionInterface[] * An array of base field definitions for the entity type, keyed by field * name. * * @see \Drupal\Core\Entity\FieldableEntityInterface::baseFieldDefinitions() */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:28
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1132
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\ContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1392
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:398
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:423
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:484
/** * {@inheritdoc} */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:494
/** * Gets the name of a revision metadata field. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * A content entity type definition. * @param string $key * The revision metadata key to get, must be one of 'revision_created', * 'revision_user' or 'revision_log_message'. * * @return string * The name of the field for the specified $key. */ Inherited from Drupal\Core\Entity\EditorialContentEntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php:138
/** * 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. */ Inherited from Drupal\Core\Entity\EntityBase Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:542
Spustitelná verze pro Windows
Spustitelná verze pro GNU/Linux