getSummary()) { $statics['summary_fields'] = $summary->toArray(); } } $r_statics = $statics; $r_statics['belongs_many_many'] = Object::get_static($class, 'belongs_many_many'); $r_statics = print_r($r_statics, true); Bedrock::message("Statics for class $class: $r_statics",""); return $statics; } /** * Given all of the information in the "Fields" node of this class configuration, * add all of the required CMS interface. * * @param FieldSet $fieldset A reference to a fieldset that has already been created * by the owner class * @param boolean $customized Set to TRUE if this fieldset has already been altered * by a custom getCMSFields() function (i.e. it was not * scaffolded) */ public function updateCMSFields(&$fieldset, $customised = false) { $class = $this->owner->class; if(!$customised) $fieldset->emptyItems(); if($fields = $this->getClassSettings()->getFields()) { foreach($fields as $field) { if($type = $field->getCMSField()) { $tab = $field->getTab(); $form_field = $field->getFormField(); if($tab) { $fieldset->addFieldToTab($tab, $form_field, $field->getBefore()); } else { $fieldset->push($form_field); } } } } if($components = $this->getClassSettings()->getComponents()) { foreach($components as $component) { if($type = $component->getType()) { $component->setControllerClass($class); $interface = $component->buildInterface($this->owner); if($interface) { if($t = $component->getTab()) { $fieldset->addFieldToTab($t, $interface); } else { $fieldset->push($interface); } } } } } parent::updateCMSFields($fieldset); } }