/ */ class P4Cms_Record_EnhancedElement extends Zend_Form_Element_Text implements P4Cms_Record_EnhancedElementInterface { /** * Test implementation of populate record method that sets field metadata. * * @param P4Cms_Record $record the record to set the value on * @return P4Cms_Record_EnhancedElementInterface provides fluent interface */ public function populateRecord(P4Cms_Record $record) { $record->setValue($this->getName(), $this->getValue()); $record->setFieldMetadata($this->getName(), array('test')); return $this; } /** * Test implementation of populate from record method. * * @param P4Cms_Record $record the record to read the value from * @return P4Cms_Record_EnhancedElementInterface provides fluent interface */ public function populateFromRecord(P4Cms_Record $record) { $this->setValue($record->getValue($this->getName())); $this->setAttrib('test', true); return $this; } }