/**
  * @param String $name
  * @return String Value of field
  */
 public function findOneByNameAndGetValue($name)
 {
     $fields = $this->repository->findBy(['name' => $name], ['order by name asc']);
     if (!$fields) {
         return;
     }
     return $fields[0]->value;
 }
 /**
  * @param String $name
  * @return String Value of field
  */
 public function findOneByNameAndGetValue($name)
 {
     $fields = $this->repository->findBy(['name' => $name], [['name' => 'ASC'], null, null]);
     if (!$fields) {
         return;
     }
     return $fields[0]->getValue();
 }
 /**
  * @param Object $field
  * @param String $order
  * @return ArrayObject Options of field
  */
 public function getOptionsOfField($field, $order)
 {
     return $this->repository->findBy(['field_id' => $field->id], Sql::orderBy($order));
 }
 /**
  * @param Object $field
  * @param String $order
  * @return ArrayObject Options of field
  */
 public function getOptionsOfField($field, array $order)
 {
     return $this->repository->findBy(['field_id' => $field->getId()], [$order, null, null]);
 }