protected function setImage(array $data, $field_value_id = null)
    {
        if (!empty($data['images']) && !empty($field_value_id)) {
            $this->file->delete(array('entity' => 'field_value', 'entity_id' => $field_value_id));
        }

        return $this->setImages($data, $this->file, 'field_value');
    }
protected function setImage(array $data, $field_value_id = null)
    {
        if (!empty($data['images']) && !empty($field_value_id)) {
            $this->file->delete(array('entity' => 'field_value', 'entity_id' => $field_value_id));
        }

        return $this->setImages($data, $this->file, 'field_value');
    }
protected function setImage ( array $ data , $ field_value_id = null ) { if ( ! empty ( $ data [ 'images' ] ) && ! empty ( $ field_value_id ) ) { $ this -> file -> delete ( array ( 'entity' => 'field_value' , 'entity_id' => $ field_value_id ) ) ; } return $ this -> setImages ( $ data , $ this -> file , 'field_value' ) ; }
Sets a single image
@param array $data
@param null|int $field_value_id
@return bool
Sets a single image