public function ensurePageId() { if ('' == $this->getMetadataAttr('pageid')) { $this->addMetadataAttr('pageid', Utils::id()); } }