updateField() 공개 메소드

Updates the field
public updateField ( integer $fieldId, array $input ) : DvsField
$fieldId integer
$input array
리턴 DvsField | \DvsGlobaField
예제 #1
0
 /**
  * Update field, creates a new version of the field
  * this returns json
  *
  * @param  integer $fieldId
  * @param  array   $input
  * @return json
  */
 public function requestUpdate($fieldId, $input)
 {
     try {
         $code = 200;
         $response = $this->Manager->updateField($fieldId, $input);
     } catch (ValidationException $e) {
         $code = 403;
         $response = ['message' => $e->getMessage(), 'errors' => $e->getErrors()];
     }
     return Response::json($response, $code);
 }
예제 #2
0
 /**
  * Update the collection instance field
  *
  * @param  [type] $fieldId [description]
  * @param  [type] $input   [description]
  * @return [type]          [description]
  */
 public function updateCollectionInstanceField($fieldId, $input)
 {
     return $this->FieldManager->updateField($fieldId, $input);
 }