Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function getValue($entity, FieldMetadata $metadata)
 {
     if ($metadata->has('activity') && $metadata->has('type') && $metadata->get('activity') === true) {
         return $this->getActivity($entity, $metadata->get('type'));
     }
     return parent::getValue($entity, $metadata);
 }
 /**
  * @dataProvider setValueDataProvider
  */
 public function testSetValue($entity, FieldMetadata $metadata, $value, $expectedEntity)
 {
     $this->accessor->setValue($entity, $metadata, $value);
     $this->assertEquals($expectedEntity, $entity);
 }