Returns the data of the field as it is displayed to the user.
public getDisplayedData ( ) |
/** * {@inheritDoc} */ public function getDisplayedData() { if ($this->mode === self::GROUP) { return parent::getDisplayedData(); } else { return Field::getDisplayedData(); } }
public function testGetDisplayedDataForwardsCall() { $field = $this->createValidMockField('firstName'); $field->expects($this->atLeastOnce())->method('getDisplayedData')->will($this->returnValue('Bernhard')); $group = new FieldGroup('author'); $group->add($field); $this->assertEquals(array('firstName' => 'Bernhard'), $group->getDisplayedData()); }