public function getCompileValue() { $o = array('name' => $this->name, 'value' => $this->value, 'internal' => $this->internal, 'domain' => $this->label->getDomain(), 'label' => $this->label->getPath(), 'action' => $this->action ? $this->action->getPath() : $this->label->getPath(), 'list' => $this->list, 'source' => $this->source, 'target' => $this->target, 'btn' => $this->btn, 'role' => $this->role, 'duty' => $this->duty, 'properties' => $this->parent->fixProperties($this->properties)); // \Dev::debug($this->name, $this->properties, $this->parent->fixProperties($this->properties) ); if ($this->action) { $o['action'] = $this->action->getPath(); } if ($this->update) { $o['update'] = $this->update->getPath(); } if ($this->message) { $o['message'] = $this->message->getPath(); } return $o; }
public function compile() { $class = $this->getCompileClass(); $class->addProperty('name', $this->name); $class->addProperty('bundle_name', $this->bundle_name); $class->addProperty('property_id_name', $this->property_id_name); $class->addProperty('property_value_name', $this->property_value_name); $class->addProperty('property_slug_name', $this->property_slug_name); $class->addProperty('property_slug_unique', $this->property_slug_unique); $class->addProperty('property_slug_nullable', $this->property_slug_nullable); $class->addProperty('class_name', $this->class_name); $class->addProperty('tr_domain', $this->tr_domain); $class->addProperty('sf_domain', $this->sf_domain); $class->addProperty('icon', $this->icon, 'string', null, 'public'); $class->addProperty('template', $this->template, 'string', null, 'public'); if ($this->tree) { $class->addProperty('tree', $this->tree, null, false, 'public'); } if ($this->page) { $this->page->compile(); } if ($this->owner) { $this->owner->compile(); } $class->addProperty('orm_map', $this->_orm_map, 'string', null, 'public'); $this->_route_assoc->compile(); $this->form->compile(); if ($this->workflow) { // make sure workflow compile after form $this->workflow->compile(); } if ($this->_auth_parents) { $class->addProperty('_auth_parents', $this->_auth_parents); } $action_maps = array(); foreach ($this->action_collection->children as $action) { $_class = $action->compile(); if ($_class) { $action_maps[$action->name] = $_class->getName(); } } $class->addProperty('action_maps', $action_maps); }