public function SubformState::createParents in Markdown 8.2
Creates a new parents array for a given element.
Parameters
string $name: The element name.
string $property: The property name (#parents or #array_parents).
Return value
array A new array of parents.
Overrides SubformStateInterface::createParents
File
- src/
Form/ SubformState.php, line 78
Class
- SubformState
- Markdown subform state.
Namespace
Drupal\markdown\FormCode
public function createParents($name = NULL, $property = '#parents') {
$parents = $this
->getAllParents($property);
if ($name) {
$parents = array_merge($parents, (array) $name);
}
return $parents;
}