/** * Computes classcontent maxentry attribute if classcontent is a ContentSet and sets it to attributes property array */ private function computeMaxEntryAttribute() { if ($this->content instanceof ContentSet) { $this->attributes['data-bb-maxentry'] = $this->content->getMaxEntry(); } }