/** * Get the name of this node template. * * If a name has been set using setName(), it is returned. If not, but the * template has a (non-empty) title property, this property is used to * generate a valid name. As a last resort a random name is returned (in * the form "name-XXXXX"). * * @return string * @api */ public function getName() { if ($this->name !== null) { return $this->name; } return NodePaths::generateRandomNodeName(); }