diff --git a/core/includes/common.inc b/core/includes/common.inc index c3d5c9d..e52181d7 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -4469,6 +4469,10 @@ function drupal_sort_title($a, $b) { /** * Checks if the key is a property. + * + * @see \Drupal\Core\Render\Element::property() + * + * @deprecated as of Drupal 8.0. Use Element::property() instead. */ function element_property($key) { return Element::property($key); @@ -4476,6 +4480,10 @@ function element_property($key) { /** * Gets properties of a structured array element (keys beginning with '#'). + * + * @see \Drupal\Core\Render\Element::properties() + * + * @deprecated as of Drupal 8.0. Use Element::properties() instead. */ function element_properties($element) { return Element::properties($element); @@ -4483,6 +4491,10 @@ function element_properties($element) { /** * Checks if the key is a child. + * + * @see \Drupal\Core\Render\Element::child() + * + * @deprecated as of Drupal 8.0. Use Element::child() instead. */ function element_child($key) { return Element::child($key); @@ -4501,6 +4513,10 @@ function element_child($key) { * * @return * The array keys of the element's children. + * + * @see \Drupal\Core\Render\Element::children() + * + * @deprecated as of Drupal 8.0. Use Element::children() instead. */ function element_children(&$elements, $sort = FALSE) { return Element::children($elements, $sort); @@ -4514,6 +4530,10 @@ function element_children(&$elements, $sort = FALSE) { * * @return * The array keys of the element's visible children. + * + * @see \Drupal\Core\Render\Element::getVisibleChildren() + * + * @deprecated as of Drupal 8.0. Use Element::getVisibleChildren() instead. */ function element_get_visible_children(array $elements) { return Element::getVisibleChildren($elements); @@ -4530,6 +4550,10 @@ function element_get_visible_children(array $elements) { * array('#propertyname' => 'attributename'). If both names are identical * except for the leading '#', then an attribute name value is sufficient and * no property name needs to be specified. + * + * @see \Drupal\Core\Render\Element::setAttributes() + * + * @deprecated as of Drupal 8.0. Use Element::setAttributes() instead. */ function element_set_attributes(array &$element, array $map) { Element::setAttributes($element, $map); diff --git a/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php index c3d2952..83a8f97 100644 --- a/core/lib/Drupal/Core/Render/Element.php +++ b/core/lib/Drupal/Core/Render/Element.php @@ -57,12 +57,13 @@ public static function child($key) { * The children of a element array are those key/value pairs whose key does * not start with a '#'. See drupal_render() for details. * - * @param $elements - * The element array whose children are to be identified. - * @param $sort + * @param array $elements + * The element array whose children are to be identified. Passed by + * reference. + * @param bool $sort * Boolean to indicate whether the children should be sorted by weight. * - * @return + * @return array * The array keys of the element's children. */ public static function children(array &$elements, $sort = FALSE) { @@ -106,10 +107,10 @@ public static function children(array &$elements, $sort = FALSE) { /** * Returns the visible children of an element. * - * @param $elements + * @param array $elements * The parent element. * - * @return + * @return array * The array keys of the element's visible children. */ public static function getVisibleChildren(array $elements) { @@ -137,9 +138,9 @@ public static function getVisibleChildren(array $elements) { /** * Sets HTML attributes based on element properties. * - * @param $element - * The renderable element to process. - * @param $map + * @param array $element + * The renderable element to process. Passed by reference. + * @param array $map * An associative array whose keys are element property names and whose values * are the HTML attribute names to set for corresponding the property; e.g., * array('#propertyname' => 'attributename'). If both names are identical