renderContentFieldView() public method

Renders the HTML view markup for a given field.
public renderContentFieldView ( eZ\Publish\API\Repository\Values\Content\Field $field, string $fieldTypeIdentifier, array $params = [] ) : string
$field eZ\Publish\API\Repository\Values\Content\Field
$fieldTypeIdentifier string FieldType identifier for $field
$params array An array of parameters to pass to the field view
return string
 /**
  * Renders the HTML for a given field.
  *
  * @param \eZ\Publish\API\Repository\Values\Content\Content $content
  * @param string $fieldIdentifier Identifier for the field we want to render
  * @param array $params An array of parameters to pass to the field view
  *
  * @return string The HTML markup
  *
  * @throws InvalidArgumentException
  */
 public function renderField(Content $content, $fieldIdentifier, array $params = [])
 {
     $field = $this->translationHelper->getTranslatedField($content, $fieldIdentifier, isset($params['lang']) ? $params['lang'] : null);
     if (!$field instanceof Field) {
         throw new InvalidArgumentException('$fieldIdentifier', "'{$fieldIdentifier}' field not present on content #{$content->contentInfo->id} '{$content->contentInfo->name}'");
     }
     $params = $this->getRenderFieldBlockParameters($content, $field, $params);
     $fieldTypeIdentifier = $this->getFieldTypeIdentifier($content, $field);
     return $this->fieldBlockRenderer->renderContentFieldView($field, $fieldTypeIdentifier, $params);
 }
 /**
  * Renders the HTML for a given field.
  *
  * @throws InvalidArgumentException
  *
  * @param \Netgen\EzPlatformSiteApi\API\Values\Field $field
  * @param array $params An array of parameters to pass to the field view
  *
  * @return string The HTML markup
  */
 public function renderField(Field $field, array $params = [])
 {
     $params = $this->getRenderFieldBlockParameters($field, $params);
     return $this->fieldBlockRenderer->renderContentFieldView($field->innerField, $field->fieldTypeIdentifier, $params);
 }