Issue #2711537 by chgasparoto, kostyashupenko: Syntax errors (un-quoted or mis-quoted strings) in various code examples in docs
parent
6ab5a3aaa1
commit
9ec1f42d37
|
@ -116,7 +116,7 @@ class DateTimePlus {
|
|||
* date even if some values are missing.
|
||||
*
|
||||
* @param array $date_parts
|
||||
* An array of date parts, like ('year' => 2014, 'month => 4).
|
||||
* An array of date parts, like ('year' => 2014, 'month' => 4).
|
||||
* @param mixed $timezone
|
||||
* (optional) \DateTimeZone object, time zone string or NULL. NULL uses the
|
||||
* default system time zone. Defaults to NULL.
|
||||
|
|
|
@ -163,9 +163,9 @@ class FormattableMarkup implements MarkupInterface, \Countable {
|
|||
* wrapped in quotes:
|
||||
* @code
|
||||
* // Secure (with quotes):
|
||||
* $this->placeholderFormat('<a href=":url">@variable</a>', [':url' => $url, @variable => $variable]);
|
||||
* $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]);
|
||||
* $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
|
||||
|
|
|
@ -17,10 +17,10 @@ use Drupal\Component\Utility\SortArray;
|
|||
* The configuration dependency value is structured like this:
|
||||
* @code
|
||||
* array(
|
||||
* 'config => array(
|
||||
* 'config' => array(
|
||||
* // An array of configuration entity object names. Recalculated on save.
|
||||
* ),
|
||||
* 'content => array(
|
||||
* 'content' => array(
|
||||
* // An array of content entity configuration dependency names. The default
|
||||
* // format is "ENTITY_TYPE_ID:BUNDLE:UUID". Recalculated on save.
|
||||
* ),
|
||||
|
@ -291,10 +291,10 @@ class ConfigDependencyManager {
|
|||
* The configuration dependencies. The array is structured like this:
|
||||
* @code
|
||||
* array(
|
||||
* 'config => array(
|
||||
* 'config' => array(
|
||||
* // An array of configuration entity object names.
|
||||
* ),
|
||||
* 'content => array(
|
||||
* 'content' => array(
|
||||
* // An array of content entity configuration dependency names. The default
|
||||
* // format is "ENTITY_TYPE_ID:BUNDLE:UUID".
|
||||
* ),
|
||||
|
|
|
@ -22,8 +22,8 @@ class Log {
|
|||
*
|
||||
* array(
|
||||
* $logging_key = array(
|
||||
* array(query => '', args => array(), caller => '', target => '', time => 0),
|
||||
* array(query => '', args => array(), caller => '', target => '', time => 0),
|
||||
* array('query' => '', 'args' => array(), 'caller' => '', 'target' => '', 'time' => 0),
|
||||
* array('query' => '', 'args' => array(), 'caller' => '', 'target' => '', 'time' => 0),
|
||||
* ),
|
||||
* );
|
||||
*
|
||||
|
|
|
@ -55,7 +55,7 @@ interface EntityFormDisplayInterface extends EntityDisplayInterface {
|
|||
* // For 'single-value' widgets:
|
||||
* '#theme' => 'field_multiple_value_form',
|
||||
* '#cardinality' => The field cardinality,
|
||||
* '#cardinality_multiple => TRUE if the field can contain multiple
|
||||
* '#cardinality_multiple' => TRUE if the field can contain multiple
|
||||
* items, FALSE otherwise.
|
||||
* // One sub-array per copy of the widget, keyed by delta.
|
||||
* 0 => array(
|
||||
|
|
|
@ -12,7 +12,7 @@ use Drupal\Core\Render\Element;
|
|||
* @code
|
||||
* $form['pass'] = array(
|
||||
* '#type' => 'password',
|
||||
* '#title => $this->t('Password'),
|
||||
* '#title' => $this->t('Password'),
|
||||
* '#size' => 25,
|
||||
* );
|
||||
* @endcode
|
||||
|
|
Loading…
Reference in New Issue