Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function attributesToArray()
 {
     $array = parent::attributesToArray();
     foreach ($array as $key => $value) {
         if (strncmp($key, 'm_field_id_', 11) === 0) {
             $id = substr($key, 11);
             if (self::$memberFieldRepository->hasFieldId($id)) {
                 $array[self::$memberFieldRepository->getFieldName($id)] = $value;
             }
             unset($array[$key]);
         }
     }
     return $array;
 }
 public function testNotHasFieldId()
 {
     $input = $this->repository->hasFieldId(99999);
     $this->assertFalse($input);
 }