public get_element_id ( ) : string | ||
return | string | ID for use in a form element. |
public function get_element_id()
{
$el = $this;
$id_slugs = array();
while ($el) {
$slug = $el->is_proto ? 'proto' : $el->seq;
array_unshift($id_slugs, $el->name . '-' . $slug);
$el = $el->parent;
}
return 'fm-' . implode('-', $id_slugs);
}