Deprecated function: Creation of dynamic property Drupal\mcapi\TransactionSerialConverter::$tempStore is deprecated in Drupal\mcapi\TransactionSerialConverter->__construct() (line 42 of sites/default/modules/mutual_credit/src/TransactionSerialConverter.php).
⧉value => UTF-8 string (7069) "<p><img alt="What's in the bag?" data-align="right" data-entity-type="file" ...
<p><img alt="What's in the bag?" data-align="right" data-entity-type="file" data-entity-uuid="15cb2ff8-c524-471a-b464-f1ad87e5618c" src="/sites/treegeneration.uk/files/inline-images/whats_in_the_bag.jpg" style="width:100%; max-width: 500px;" /></p>
<p style="font-size:1.8em;line-height: 1.25em;">TREE<strong>GENERATION</strong> <strong>LOCAL</strong> is a <em>revolutionary way to do business</em> that will get you new and loyal customers! We aim to raise funds for wildlife projects, whilst simultaneously giving local businesses and town centres a much needed boost.</p>
<div>
<p>Through our website we are selling <a href="/vouchers">e-vouchers</a> to people who like shopping locally, and people who are into supporting wildlife. When a customer buys a voucher from us, a percentage of what they pay is automatically sent to a wildlife project of their choice. We hold on to the rest of the payment, until the customer redeems their voucher at your store, at which point the balance is paid out to you. You decide the denomination of your vouchers, and the percentage that is donated to wildlife projects from each one that we sell.</p>
<p>In return for the donation we promote your business, bringing you new customers, loyalty, and increased sales. When enough businesses take part, we can simultaneously regenerate our town centres and the wildlife in our surrounding countryside.</p>
<p>We are planning to rollout TREE<strong>GENERATION LOCAL</strong> in West Wales later this year, and would really like to know what you think about it. Please use the link below to register an interest if you would like your business to be involved. We are also keen to hear your feedback if you are unsure about the project, or do not think that is is for you.</p>
<!--
<div class="treegen messages messages--status" style="overflow: hidden;text-align: center;">
<div class="container">
<div class="messages__list">First ten to register receive <strong>£20</strong> free vouchers from Treegeneration!</div>
</div>
</div>
-->
<!--
<div class="treegen messages messages--status" style="overflow: hidden;text-align: center;">
<div class="container">
<div class="messages__list"><strong><a href="/merchant/local/workshop">Book your place</a></strong> on a free demonstration workshop at Eco Hub Aber, Monday 21st Nov, 6.00 - 7.15pm.</div>
</div>
</div>
-->
<p class="treegen-link-container" style="clear:both"><br />
<a class="body-treegen-link" href="/merchant/local/expression-of-interest">TELL US WHAT YOU THINK AND REGISTER YOUR INTEREST</a><br />
</p>
</div>
<img alt="The Treegeneration Local wealth creation cycle" class="colorbox" data-align="center" data-entity-type="file" data-entity-uuid="40196cad-e248-4827-a9ff-5942c81e3b7c" src="/sites/treegeneration.uk/files/inline-images/wealth_creation_cycle.jpg" style="margin-right: 15px" title="The Treegeneration Local Wealth Creation Cycle" />
<h4><br />
How TREEGENERATION LOCAL will help your business</h4>
<p><a href="/vouchers"><img alt="Deli Delicious sample voucher" data-align="right" src="/sites/treegeneration.uk/files/styles/sample_voucher/public/sample_vouchers/sample_voucher_62_2.pdf.jpg" style="width:100%; max-width: 300px;" /></a></p>
<p>As a participating business you make a <strong>commitment</strong> to support wildlife projects, and sell e-vouchers through TREE<strong>GENERATION</strong>'s website. We promote your vouchers to customers on your behalf, through a mix of social and local media.</p>
<p>Customers purchase your vouchers through our website, and a percentage of what they pay is forwarded to a local wildlife project of their choice. The vouchers that your customers purchase are redeemed at your store, in return for goods and services. </p>
<p>The income that is generated funds woodland creation and wildlife projects that provide value to the local economy, through 'ecosystem services' that prevent climate change, and improve the health, well-being, and prosperity of people who live, work, and shop in the area. In addition, new woodlands help to tackle the biodiversity crisis, and support local wildlife through the creation of natural habitat.</p>
<p>When your business participates in TREE<strong>GENERATION LOCAL</strong> we will:</p>
<ul>
<li>promote your brand and direct people to your website;</li>
<li>get more customers into the town centre and through your door;</li>
<li>generate new sales and improve customer loyalty.<br />
</li>
</ul>
<h4><img alt="Download our guide for SMEs" data-align="left" data-entity-type="file" data-entity-uuid="38917c51-8741-4049-b2c7-42c29ae625ca" src="/sites/treegeneration.uk/files/inline-images/treegeneration_local_guide.600_0.jpg" />Find out more</h4>
<p>If you like what you've seen so far, and would like more information on how TREE<strong>GENERATION LOCAL</strong> can help your business, community, and environment, you can download our introductory guide for SMEs.</p>
<p><a class="body-treegen-link" href="/sites/treegeneration.uk/files/TreegenerationLocal_SMEs.highres.pdf" target="new">Download Introductory Guide (12 MB)</a><br />
<a href="/sites/treegeneration.uk/files/TreegenerationLocal_SMEs.lowres.pdf" style="font-size:smaller;color:#efa350;margin-left:65px;" target="new">(Low resolution version here - 1 MB)</a></p>
<h4 style="clear:both"><br />
Programme rollout</h4>
<p><span style="line-height:100%"><strong><span style="font-weight:normal">We are talking to several wildlife organisations in West Wales, and </span></strong><strong><span style="font-weight:normal">aim</span></strong><strong><span style="font-weight:normal"> to raise funds through a collaborative effort, </span></strong><strong><span style="font-weight:normal">down the coast</span></strong><strong><span style="font-weight:normal">, from the Dyfi Estuary to the </span></strong><strong><span style="font-weight:normal">bottom</span></strong><strong><span style="font-weight:normal"> of </span></strong><strong><span style="font-weight:normal">Pembrokeshire.</span></strong></span> We are currently seeking Expressions of Interest from pioneer businesses for our pilot programme and would love to hear from you whether your business is located in this area or not.</p>
<p>If you are interested in your business being part of this unique initiative, or have any other feedback, please complete the short form below. Expression of Interest will remain open until we have a good number of businesses on board, after which we will begin the rollout in your area, and send you more information about how to get started.</p>
<p>If you would like to know more about the rollout then please get in touch using the <a href="/contact">site contact form</a>.</p>
<p> </p>
<p class="treegen-link-container text-align-center"><a class="body-treegen-link" href="/merchant/local/expression-of-interest">TELL US WHAT YOU THINK AND REGISTER YOUR INTEREST IN THE ROLLOUT COMING TO WEST WALES SOON </a></p>
<p> </p>
<p> </p>
summary => string (0) ""
format => string (9) "full_html"
⧉field_accordion_section => array (1)
⧉x-default => array (9)
Table (9)
Contents (9)
question
answer
answer_format
0
What will happen with the money that is raised?
<p>We are in discussion with a number of wildlife organisations along the wes...
full_html
1
How will Treegeneration promote my business and sell my offers?
<p>Your business will be promoted in a variety of ways through the TREE<...
full_html
2
How much does it cost?
<p>There is no fee for your business to sign up to the TREE<strong>GENERATION...
basic_html
3
Is it a big commitment for my business?
It is up to you, commit to whatever value you feel comfortable with. The mini...
restricted_html
4
How long will the pilot rollout go on for?
<p>TREE<strong>GENERATION</strong> will set fundraising targets with the bene...
basic_html
5
Will my business need to download the mobile app?
<p>When a customer buys your business offers from our site, the money that th...
basic_html
6
Does my business need to be based in a town centre?
<p>We are hoping to get as many businesses in the area involved as possible, ...
basic_html
7
How do woodlands provide value to the local economy?
According to the Office for National Statistics (ONS), woodlands provide arou...
restricted_html
8
Does Treegeneration support rewilding?
<p>The UK has a target to plant in excess of <a href="https://www.theccc.org....
full_html
⧉0 => array (3)
question => string (47) "What will happen with the money that is raised?"
⧉answer => UTF-8 string (368) "<p>We are in discussion with a number of wildlife organisations along the we...
<p>We are in discussion with a number of wildlife organisations along the west coast of Wales. Because this is a brand new initiative we have very modest fundraising aspirations at the moment. In the initial role out, we are unlikely to try and raise more than £1-200 while we test the system. We hope to announce our first beneficiary project before Christmas.</p>
answer_format => string (9) "full_html"
⧉1 => array (3)
question => string (63) "How will Treegeneration promote my business and sell my offers?"
⧉answer => string (1223) "<p>Your business will be promoted in a variety of ways through the TREE...
<p>Your business will be promoted in a variety of ways through the TREE<strong>GENERATION</strong> rollout:</p>
<ul>
<li>we will promote all participating businesses on our own website, and through our own rapidly growing social networks, and mailing list;</li>
<li>the beneficiary organisations who we are fundraising for will promote the project to their own networks, through their websites, and mailing lists;</li>
<li>your business offers on the website have social share buttons, and customers are encouraged to use these when they are shopping, and at the end of checkout, in order to promote business offers, and the project in general, amongst their own networks;</li>
<li>we will rally local authorities, and business support organisations, to help promote the initiative;</li>
<li>we will work with local press and media, to promote the project through newspapers, radio, TV, etc;</li>
<li>the general population will be further engaged through video campaigning and targetted marketing on the most popular social media channels.</li>
</ul>
<p>Finally, we would expect you to reach out to your own customers to promote your business offers through whatever means you have available.</p>
answer_format => string (9) "full_html"
⧉2 => array (3)
question => string (22) "How much does it cost?"
⧉answer => string (260) "<p>There is no fee for your business to sign up to the TREE<strong>GENERATIO...
<p>There is no fee for your business to sign up to the TREE<strong>GENERATION</strong> initiative. We will take a percentage of the funds raised through the programme in order to cover the costs of running the project, and promoting your business offers.</p>
answer_format => string (10) "basic_html"
⧉3 => array (3)
question => string (39) "Is it a big commitment for my business?"
⧉answer => UTF-8 string (442) "It is up to you, commit to whatever value you feel comfortable with. The min...
It is up to you, commit to whatever value you feel comfortable with. The minimum amount that you can commit to is £25, but we recommend that you do more than this in order to make an impact. If the rollout is not working out for your business, you can withdraw any offers you have made before fulfilling your commitment. On the other hand if the rollout benefits your business, you can "top up" your commitment and keep on going with it.
answer_format => string (15) "restricted_html"
⧉4 => array (3)
question => string (42) "How long will the pilot rollout go on for?"
⧉answer => string (284) "<p>TREE<strong>GENERATION</strong> will set fundraising targets with the ben...
<p>TREE<strong>GENERATION</strong> will set fundraising targets with the beneficiary organisations. The rollout will continue until the funds have been generated. If the rollout is a success, we may choose to do additional rounds in the future, to raise funds for more woodland.</p>
answer_format => string (10) "basic_html"
⧉5 => array (3)
question => string (49) "Will my business need to download the mobile app?"
⧉answer => string (960) "<p>When a customer buys your business offers from our site, the money that t...
<p>When a customer buys your business offers from our site, the money that they pay is forwarded by TREE<strong>GENERATION</strong> to the beneficiary tree planting project, and at this point it is effectively a donation. The mobile app is required to close the circle, so when the customer arrives at your checkout with their TREE<strong>GENERATION</strong> e-voucher, and you scan it with a mobile device using the app, this automatically informs TREE<strong>GENERATION</strong> that the voucher has been redeemed. At this point the cash that was paid is no longer a donation from the customer, and the funds that have been raised are accredited to your business instead. Funds that you have generated in this way will be tracked and displayed on our website. In the future we plan to provide more integrated point of sale solutions, but during the pilot phase of the project we are limited to providing the mobile app to complete the transaction.</p>
answer_format => string (10) "basic_html"
⧉6 => array (3)
question => string (51) "Does my business need to be based in a town centre?"
⧉answer => string (857) "<p>We are hoping to get as many businesses in the area involved as possible,...
<p>We are hoping to get as many businesses in the area involved as possible, and you do not need to be located in a town centre. However, by getting a significant number of town centre businesses involved, we hope to make a splash, and to give these places a much needed boost. Town centres are under pressure from a variety of courses, including supermarkets, and other out of town retail, and more recently the rise of internet shopping. The UK economy has never really recovered from the 2008 banking crises, plus on top of that we have the impact of Covid and possibly Brexit, although the later is hard to quantify since it was eclipsed by the pandemic. TREE<strong>GENERATION LOCAL</strong> does not aim to make people buy more, but it does wish to change shopping habits, and get people away from Ebay and Amazon, and back onto the high street.</p>
answer_format => string (10) "basic_html"
⧉7 => array (3)
question => string (52) "How do woodlands provide value to the local economy?"
⧉answer => UTF-8 string (1199) "According to the Office for National Statistics (ONS), woodlands provide aro...
According to the Office for National Statistics (ONS), woodlands provide around <a href="https://www.ons.gov.uk/economy/environmentalaccounts/bulletins/woodlandnaturalcapitalaccountsuk/2020">£1,000 / hectare / year</a> of value to the local economy. This is provided mostly in the form of "ecosystem services", including carbon sequestration (tackling climate change), air pollution removal, flood mitigation, temperature regulation, noise reduction, recreation, and education. Many of these services have a positive impact on our health and well-being, and their value on the economy can be measured in terms like reduced days off work, and cost to the NHS. Carbon sequestration is one of the most important ecosystem services that a woodland provides. In actual fact the figure of £1,000 / ha / yr reported by the ONS is probably too low, since the price of carbon has tripled since their report was written in 2020. Another important aspect of woodland is that it provides habitat for wildlife. Although the provision of natural habitat is obviously very important, this "service" is not included in the ONS value, since there is currently no clear way to measure the impact within the economy.
answer_format => string (15) "restricted_html"
⧉8 => array (3)
question => string (38) "Does Treegeneration support rewilding?"
⧉answer => string (786) "<p>The UK has a target to plant in excess of <a href="https://www.theccc.org...
<p>The UK has a target to plant in excess of <a href="https://www.theccc.org.uk/publication/land-use-policies-for-a-net-zero-uk/" target="new">2 billion trees by 2050</a>, in order to achieve carbon neutrality, and Wales has an important role to play in this. Since most of Wales is farmland, our priority is to support farmers to diversify and plant trees and small woodlands. By planting the right trees in the right places, it is possible to increase the overall prosperity of farms, through improving the health and well-being of stock, and the land that sustains them. Also by working on a bigger scale with clusters of farmers, we can create joined-up woodlands, providing habitat corridors, or other ecological services such as watershed improvements, or flood alleviation.</p>
answer_format => string (9) "full_html"
⧉field_better_title => array (1)
⧉x-default => array (1)
⧉0 => array (2)
value => string (27) "TREE<b>GENERATION LOCAL</b>"
format => string (10) "basic_html"
⧉field_meta_tags => array (1)
⧉x-default => array (1)
⧉0 => array (1)
⧉value => string (642) "a:7:{s:11:"description";s:44:"Supporting local shops that benefit wildlife";...
a:7:{s:11:"description";s:44:"Supporting local shops that benefit wildlife";s:14:"og_description";s:44:"Supporting local shops that benefit wildlife";s:8:"og_image";s:70:"/sites/treegeneration.uk/files/treegeneration_local_share.1200.628.jpg";s:19:"og_image_secure_url";s:70:"/sites/treegeneration.uk/files/treegeneration_local_share.1200.628.jpg";s:12:"og_image_url";s:70:"/sites/treegeneration.uk/files/treegeneration_local_share.1200.628.jpg";s:25:"twitter_cards_description";s:44:"Supporting local shops that benefit wildlife";s:19:"twitter_cards_image";s:75:"/sites/treegeneration.uk/files/treegeneration_local_default_share_image.jpg";}
⧉field_rendered_entity => array (1)
⧉x-default => array (1)
⧉0 => array (1)
target_id => string (2) "28"
⧉field_social_share => array (1)
⧉x-default => array (1)
⧉0 => array (1)
value => string (1) "1"
⧉field_theme => array (1)
⧉x-default => array (1)
⧉0 => array (1)
value => string (8) "business"
⧉field_theme_summary_text => array (1)
⧉x-default => array (1)
⧉0 => array (2)
⧉value => string (64) "<p>Generating new and loyal customers for local businesses</p> "
<p>Generating new and loyal customers for local businesses</p>
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "integer"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (4) "uuid"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "integer"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (8) "language"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (16) "entity_reference"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (47) "The time that the current revision was created."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "created"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (50) "The user ID of the author of the current revision."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (16) "entity_reference"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (43) "Briefly describe the changes you have made."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (11) "string_long"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "boolean"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (35) "The username of the content author."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (16) "entity_reference"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (6) "string"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (47) "The date and time that the content was created."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "created"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (39) "The time that the node was last edited."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "changed"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
protected label -> string (22) "Promoted to front page"
protected description -> string (0) ""
⧉protected settings -> array (2)
on_label => string (2) "On"
off_label => string (3) "Off"
protected required -> boolean false
protected translatable -> boolean false
⧉protected default_value -> array (1)
⧉0 => array (1)
value => integer 0
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected baseFieldDefinition -> null
⧉public __construct(array $values, $entity_type = 'base_field_override') Constructs a BaseFieldOverride object.
/**
* Constructs a BaseFieldOverride object.
*
* In most cases, base field override entities are created via
* BaseFieldOverride::createFromBaseFieldDefinition($definition, 'bundle')
*
* @param array $values
* An array of base field bundle override properties, keyed by property
* name. The field to override is specified by referring to an existing
* field with:
* - field_name: The field name.
* - entity_type: The entity type.
* Additionally, a 'bundle' property is required to indicate the entity
* bundle to which the bundle field override is attached to. Other array
* elements will be used to set the corresponding properties on the class;
* see the class property documentation for details.
* @param string $entity_type
* (optional) The type of the entity to create. Defaults to
* 'base_field_override'.
*
* @throws \Drupal\Core\Field\FieldException
* Exception thrown if $values does not contain a field_name, entity_type or
* bundle value.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:102
/**
* {@inheritdoc}
*
* @throws \Drupal\Core\Field\FieldException
* If the bundle is being changed.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:191
⧉public __sleep() Implements the magic __sleep() method.
/**
* Implements the magic __sleep() method.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:262
⧉public id() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:201
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:208
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:215
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@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:648
⧉protected getBaseFieldDefinition(): \Drupal\Core\Field\BaseFieldDefinition Gets the base field definition.
/**
* Gets the base field definition.
*
* @return \Drupal\Core\Field\BaseFieldDefinition
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:177
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected linkTemplates(): array Gets an array link templates.
/**
* 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:248
⧉protected urlRouteParameters($rel): array Gets an array of placeholders for this entity.
/**
* 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:278
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
⇄⧉public static createFromBaseFieldDefinition(Drupal\Core\Field\BaseFieldDefinition $base_field_definition, $bundle): \Drupal\Core\Field\Entity\BaseFieldOverride Creates a base field override object.
/**
* Creates a base field override object.
*
* @param \Drupal\Core\Field\BaseFieldDefinition $base_field_definition
* The base field definition to override.
* @param string $bundle
* The bundle to which the override applies.
*
* @return \Drupal\Core\Field\Entity\BaseFieldOverride
* A new base field override object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:71
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:226
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\Core\Field\FieldConfigInterface|null Loads a base field bundle override config entity.
/**
* Loads a base field bundle override config entity.
*
* @param string $entity_type_id
* ID of the entity type.
* @param string $bundle
* Bundle name.
* @param string $field_name
* Name of the field.
*
* @return \Drupal\Core\Field\FieldConfigInterface|null
* The base field bundle override config entity if one exists for the
* provided field name, otherwise NULL.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php:255
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:560
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
protected string -> string (22) "Sticky at top of lists"
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "boolean"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (58) "A flag indicating whether this is the default translation."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "boolean"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (72) "A flag indicating whether this was a default revision when it was saved."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "boolean"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (72) "Indicates if the last edit of a translation belongs to current revision."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (7) "boolean"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
protected string -> string (40) "Metatags (Hidden field for JSON support)"
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (29) "The meta tags for the entity."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
class => string (55) "\Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList"
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (3) "map"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (4) "path"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
protected string -> string (68) "Computed menu link for the node (only available during node saving)."
protected arguments -> array (0)
protected translatedMarkup -> null
protected options -> array (0)
protected stringTranslation -> null
⧉public __toString(): string Implements the magic __toString() method.
/**
* Implements the magic __toString() method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:13
⧉public __construct($string, array $arguments = array(), array $options = array(), ?Drupal\Core\StringTranslation\TranslationInterface $string_translation = null) Constructs a new class instance.
/**
* Constructs a new class instance.
*
* When possible, use the
* \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise
* create a new \Drupal\Core\StringTranslation\TranslatableMarkup object
* directly.
*
* Calling the trait's t() method or instantiating a new TranslatableMarkup
* object serves two purposes:
* - At run-time it translates user-visible text into the appropriate
* language.
* - Static analyzers detect calls to t() and new TranslatableMarkup, and add
* the first argument (the string to be translated) to the database of
* strings that need translation. These strings are expected to be in
* English, so the first argument should always be in English.
* To allow the site to be localized, it is important that all human-readable
* text that will be displayed on the site or sent to a user is made available
* in one of the ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink.
* See the @link https://www.drupal.org/node/322729 Localization API @endlink
* pages for more information, including recommendations on how to break up or
* not break up strings for translation.
*
* @section sec_translating_vars Translating Variables
* $string should always be an English literal string.
*
* $string should never contain a variable, such as:
* @code
* new TranslatableMarkup($text)
* @endcode
* There are several reasons for this:
* - Using a variable for $string that is user input is a security risk.
* - Using a variable for $string that has even guaranteed safe text (for
* example, user interface text provided literally in code), will not be
* picked up by the localization static text processor. (The parameter could
* be a variable if the entire string in $text has been passed into t() or
* new TranslatableMarkup() elsewhere as the first argument, but that
* strategy is not recommended.)
*
* It is especially important never to call new TranslatableMarkup($user_text)
* or t($user_text) where $user_text is some text that a user entered -- doing
* that can lead to cross-site scripting and other security problems. However,
* you can use variable substitution in your string, to put variable text such
* as user names or link URLs into translated text. Variable substitution
* looks like this:
* @code
* new TranslatableMarkup("@name's blog", ['@name' => $account->getDisplayName()]);
* @endcode
* Basically, you can put placeholders like @name into your string, and the
* method will substitute the sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* for details about how to safely and correctly define variables in your
* string.) Translators can then rearrange the string as necessary for the
* language (e.g., in Spanish, it might be "blog de @name").
*
* @param string $string
* A string containing the English text to translate.
* @param array $arguments
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* (optional) The string translation service.
*
* @throws \InvalidArgumentException
* Exception thrown when $string is not a string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
*
* @ingroup sanitization
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:129
⧉public getUntranslatedString(): string Gets the untranslated string value stored in this translated string.
/**
* 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
⧉public getOption($name): mixed Gets a specific option from this translated string.
/**
* 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
⧉public getOptions(): mixed[] Gets all options from this translated string.
/**
* Gets all options from this translated string.
*
* @return mixed[]
* The array of options.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:168
⧉public getArguments(): mixed[] Gets all arguments from this translated string.
/**
* Gets all arguments from this translated string.
*
* @return mixed[]
* The array of arguments.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:178
⧉public render(): string Renders the object as a string.
/**
* Renders the object as a string.
*
* @return string
* The translated string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:188
⧉public __sleep() Magic __sleep() method to avoid serializing the string translator.
/**
* Magic __sleep() method to avoid serializing the string translator.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:203
⧉public count(): int Returns the string length.
/**
* Returns the string length.
*
* @return int
* The length of the string.
*/
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:228
⧉public jsonSerialize(): string Returns a representation of the object for use in JSON serialization.
/**
* 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
⧉protected _die() For test purposes, wrap die() in an overridable method.
/**
* For test purposes, wrap die() in an overridable method.
*/
Defined in <ROOT>/core/lib/Drupal/Component/Utility/ToStringTrait.php:31
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* 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
⧉protected static placeholderFormat($string, array $args): string Replaces placeholders in a string with values.
/**
* 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
⧉protected static placeholderEscape($value): string Escapes a placeholder replacement value if needed.
/**
* 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:267
revisionable => boolean true
class => string (35) "\Drupal\token\MenuLinkFieldItemList"
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* 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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* 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
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* 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
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
/**
* 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
protected type -> string (16) "entity_reference"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* 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
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@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:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* 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
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* 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
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* 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
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* 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
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* 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
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* 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
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* 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
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* 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:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* 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
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* 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
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* 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
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* 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:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* 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
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* 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
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* 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:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* 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
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* 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
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@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
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* 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
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* 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
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* 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
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* 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
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* 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
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* 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
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* 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
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* 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
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* 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
⧉public getConstraints() {@inheritdoc}
/**
* {@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:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* 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:298
/**
* {@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
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@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:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@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:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* 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:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* 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
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* 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}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
⧉protected description -> string (104) "Provide a better title with HTML formatting. If you do this the regular page...
Provide a better title with HTML formatting. If you do this the regular page title block will be hidden.
protected settings -> array (0)
protected required -> boolean false
protected translatable -> boolean false
protected default_value -> array (0)
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected deleted -> boolean false
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
protected label -> string (18) "Action link blocks"
protected description -> string (0) ""
⧉protected settings -> array (2)
handler => string (21) "default:block_content"
⧉handler_settings => array (4)
⧉target_bundles => array (1) Depth Limit
⧉sort => array (1) Depth Limit
auto_create => boolean false
auto_create_bundle => string (12) "action_links"
protected required -> boolean false
protected translatable -> boolean false
protected default_value -> array (0)
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected deleted -> boolean false
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
protected label -> string (26) "Include social share links"
protected description -> string (0) ""
⧉protected settings -> array (2)
on_label => string (2) "On"
off_label => string (3) "Off"
protected required -> boolean false
protected translatable -> boolean false
⧉protected default_value -> array (1)
⧉0 => array (1)
value => integer 0
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected deleted -> boolean false
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
protected id -> string (21) "node.page.field_theme"
protected field_name -> string (11) "field_theme"
protected field_type -> string (11) "list_string"
protected entity_type -> string (4) "node"
protected bundle -> string (4) "page"
protected label -> string (5) "Theme"
protected description -> string (0) ""
protected settings -> array (0)
protected required -> boolean false
protected translatable -> boolean false
protected default_value -> array (0)
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected deleted -> boolean false
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
protected description -> string (51) "Add a summary text to go in the themed header area."
protected settings -> array (0)
protected required -> boolean false
protected translatable -> boolean false
protected default_value -> array (0)
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected deleted -> boolean false
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
protected description -> string (39) "Optionally add a form to the page here."
⧉protected settings -> array (2)
handler => string (15) "default:webform"
⧉handler_settings => array (2)
target_bundles => null
auto_create => boolean false
protected required -> boolean false
protected translatable -> boolean true
protected default_value -> array (0)
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected deleted -> boolean false
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* 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:108
/**
* 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:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:466
⧉public __sleep() Implements the magic __sleep() method.
/**
* 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:478
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:509
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:522
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:529
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:539
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:614
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:629
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* 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:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:164
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:182
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:190
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:198
⧉public status() {@inheritdoc}
/**
* {@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
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:220
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:227
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:252
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:405
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:414
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:443
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:457
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:464
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:513
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:521
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:533
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:540
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:553
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:594
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:601
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:616
/**
* {@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
⧉public traitSleep() {@inheritdoc}
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* 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
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* 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
* [
* 'module' => [
* '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
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* 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
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* 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
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* 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
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* 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:287
/**
* 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:429
/**
* {@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:491
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* 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:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:500
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* 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:238
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* 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:501
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* 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:587
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/node/src/Entity/Node.php:264
⇄⧉public getChangedTimeAcrossTranslations(): int Returns the timestamp of the last entity change across all translations.
$0->getChangedTimeAcrossTranslations()
/**
* 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
⇄⧉public getChangedTime(): int|null Gets the timestamp of the last entity change for the current translation.
$0->getChangedTime()
/**
* Gets the timestamp of the last entity change for the current translation.
*
* @return int|null
* The timestamp of the last entity save operation. Some entities allow a
* NULL value indicating the changed time is unknown.
*/
Inherited from Drupal\Core\Entity\EditorialContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangedTrait.php:33
⇄⧉public setChangedTime($timestamp): $this Sets the timestamp of the last entity change for the current translation.
$0->setChangedTime($timestamp)
/**
* 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:46
⇄⧉public isPublished() {@inheritdoc}
$0->isPublished()
/**
* {@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
⇄⧉public isSyncing() {@inheritdoc}
$0->isSyncing()
/**
* {@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:419
⇄⧉public setDefaultTranslationEnforced(?bool $enforce_default_translation): static Set or clear an override of the isDefaultTranslation() result.
/**
* Set or clear an override of the isDefaultTranslation() result.
*
* @param bool|null $enforce_default_translation
* If boolean value is passed, the value will override the result of
* isDefaultTranslation() method. If NULL is passed, the default logic will
* be used.
*
* @return $this
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:434
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1040
⇄⧉public updateOriginalValues() Updates the original values with the interim changes.
$0->updateOriginalValues()
/**
* Updates the original values with the interim changes.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1057
⧉public & __get($name) Implements the magic method for getting object properties.
/**
* 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:1077
⧉public __set($name, $value) Implements the magic method for setting object properties.
/**
* 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:1104
⧉public __isset($name) Implements the magic method for isset().
/**
* Implements the magic method for isset().
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1138
⧉public __unset($name) Implements the magic method for unset().
/**
* Implements the magic method for unset().
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1147
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1178
⇄⧉public __clone() Magic method: Implements a deep clone.
clone $0
/**
* Magic method: Implements a deep clone.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1211
⇄⧉public label() {@inheritdoc}
$0->label()
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1297
/**
* {@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
⇄⧉public traitSleep() {@inheritdoc}
$0->traitSleep()
/**
* {@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
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⇄⧉public isNew() {@inheritdoc}
$0->isNew()
/**
* {@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:662
⧉protected traitGetFieldsToSkipFromTranslationChangesCheck(Drupal\Core\Entity\ContentEntityInterface $entity): string[] Returns an array of field names to skip when checking for changes.
/**
* 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
⧉protected getLanguages() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:280
⧉protected clearTranslationCache() Clears entity translation object cache to remove stale references.
/**
* Clears entity translation object cache to remove stale references.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:540
⧉protected getTranslatedField($name, $langcode): \Drupal\Core\Field\FieldItemListInterface Gets a translated field.
/**
* 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:607
⧉protected setDefaultLangcode() Populates the local cache for the default language code.
/**
* 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:767
⧉protected updateFieldLangcodes($langcode) Updates language for already instantiated fields.
/**
* Updates language for already instantiated fields.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:800
⧉protected initializeTranslation($langcode): \Drupal\Core\Entity\EntityInterface Instantiates a translation object for an existing translation.
/**
* 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:930
⧉protected getEntityKey($key): mixed Gets the value of the given entity key, if defined.
/**
* 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:1333
⧉protected getFieldsToSkipFromTranslationChangesCheck(): array Returns an array of field names to skip in ::hasTranslationChanges.
/**
* 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:1435
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* 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
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* 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
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* 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
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* 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
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* 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
⧉protected linkTemplates(): array Gets an array link templates.
/**
* 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:248
⧉protected urlRouteParameters($rel): array Gets an array of placeholders for this entity.
/**
* 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:278
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* 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:461
⧉protected invalidateTagsOnSave($update) Invalidates an entity's cache tags upon save.
/**
* 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:532
⇄⧉public static ownerBaseFieldDefinitions(Drupal\Core\Entity\EntityTypeInterface $entity_type): \Drupal\Core\Field\BaseFieldDefinition[] Returns an array of base field definitions for entity owners.
/**
* 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
⇄⧉public static getDefaultEntityOwner(): mixed Default value callback for 'owner' base field.
\Drupal\node\Entity\Node::getDefaultEntityOwner()
/**
* 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:272
⇄⧉public static publishedBaseFieldDefinitions(Drupal\Core\Entity\EntityTypeInterface $entity_type): \Drupal\Core\Field\BaseFieldDefinition[] Returns an array of base field definitions for publishing status.
/**
* 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
⇄⧉public static revisionLogBaseFieldDefinitions(Drupal\Core\Entity\EntityTypeInterface $entity_type): \Drupal\Core\Field\FieldDefinitionInterface[] Provides revision-related base field definitions for an entity type.
/**
* 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\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:509
⧉protected static invalidateTagsOnDelete(Drupal\Core\Entity\EntityTypeInterface $entity_type, array $entities) Invalidates an entity's cache tags upon delete.
/**
* 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:557