public function asModel() { $fields = array(); foreach ($this->getColumns()->getColumns() as $column) { $fields[] = $column->asField(); } return $this->getJSObject(array('id' => $this->getModelName(), 'url' => ZendURLFormatter::fromCamelCaseToDashConnection($this->getModelName()), 'title' => str_replace('-', ' ', ZendURLFormatter::fromCamelCaseToDashConnection($this->getModelName())), 'fields' => $fields)); }