Render image field row

@access public

@param IFormModel $model model
@param string $property model property
@param array $options attribute array

@return string
11651
public function imageFieldRow(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::openTag('div', $this->getBlock('block', $options)).
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
        $this->imageField($model, $property, $options).
        Html::closeTag('div');
    }
1082091
public function textFieldRow($model, $attribute, $htmlOptions = array())
	{
		return $this->inputRow(CiiInput::TYPE_TEXT, $model, $attribute, null, $htmlOptions);
	}
730888
public function render(ItemInterface $item, array $options = []): string
    {
        return $this->engine->render($options['template'], ['menu' => $item, 'options' => $options]);
    }
608891
protected function renderTemplate($data, array $options)
    {
        return $this->twig->render(
            $options['template'],
            array_merge($options['context'], ['column' => $options['column'], 'data' => $data])
        );
    }
754840
public function fileFieldRow(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::openTag('div', $this->getBlock('block', $options)).
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
        $this->fileField($model, $property, $options).
        Html::closeTag('div');
    }
597647
public function passwordField($objectName, $property, array $options = [])
    {
        if (!array_key_exists('value', $options)) {
            $options['value'] = '';
        }
        return $this->formField('password', $objectName, $property, $options);
    }
253477
public function telField(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::telField($element['name'], $element['value'], $options);
    }
814974
public function radioButtonListFieldRow(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::openTag('div', $this->getBlock('block', $options)).
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
        $this->radioButtonListField($model, $property, $options).
        Html::closeTag('div');
    }
1219557
protected function prepareImageRules(Model $model, $property, $fieldName, $field)
    {
        $getter = 'get'.studly_case($property);
        $setter = 'set'.studly_case($property);

        if (! method_exists($model, $getter) || ! method_exists($model, $setter)) {
            throw new \Exception('Unexpected missing method on model '.get_class($model));
        }

        // Calculate minimum allowed image size.
        list($minWidth, $minHeight) = $model->getMinAllowedImageSize($field);
        // Set dimensions on the model.
        $model->setMinDimensions($fieldName, ['width' => $minWidth, 'height' => $minHeight]);

        $modelRules = $model->$getter();

        $restrictions = [];
        if ($minWidth) {
            $restrictions[] = 'min_width='.$minWidth;
        }
        if ($minHeight) {
            $restrictions[] = 'min_height='.$minHeight;
        }

        // Find actual field name
        // Try to get the field config for the image.
        foreach ($model->getFormFields() as $formFieldName => $config) {
            if ($config['type'] == 'gallery' && isset($config['image_field']) && $config['image_field'] == $fieldName) {
                $fieldName = $formFieldName;
                break;
            }
        }

        // Prepare model rules.
        if (isset($modelRules[$fieldName])) {
            // We need to get widget config
            $rules = explode('|', $modelRules[$fieldName]);

            $fieldConfig = $model->getFormField($fieldName);
            if ($fieldConfig['type'] == 'gallery') {
                // we need to remove the required attribute as we validate elsewhere
                if (($requiredKey = array_search('required', $rules)) !== false) {
                    $rules[$requiredKey] = 'gallery_required:'.get_class($model);
                    $this->requiredImages[$fieldName] = $fieldName;
                }
            }

            if (strstr($modelRules[$fieldName], 'max:') === false) {
                if ($maxImageSize = config('ignicms.images.max_upload_size')) {
                    $rules[] = 'max:'.$maxImageSize;
                    $modelRules[$fieldName] = 'dimensions:'.implode(',', $restrictions).
                        '|max:'.$maxImageSize;
                }
            }
            // Check to see for dimensions rule and remove it.
            if (strstr($modelRules[$fieldName], 'dimensions:') !== false) {
                foreach ($rules as $key => $rule) {
                    if (strstr($rule, 'dimensions:') !== false) {
                        unset($rules[$key]);
                    }
                }
            }
            $rules[] = 'dimensions:'.implode(',', $restrictions);
            $modelRules[$fieldName] = implode('|', $rules);
        } else {
            $modelRules[$fieldName] = '';
            if ($maxImageSize = config('ignicms.images.max_upload_size')) {
                $modelRules[$fieldName] .= 'max:'.$maxImageSize.'|';
            }
            $modelRules[$fieldName] .= 'dimensions:'.implode(',', $restrictions);
        }

        $model->$setter($modelRules);
    }
555754
public function emailFieldRow(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::openTag('div', $this->getBlock('block', $options)).
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
        $this->emailField($model, $property, $options).
        Html::closeTag('div');
    }
1331779
public function urlFieldRow(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::openTag('div', $this->getBlock('block', $options)).
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
        $this->urlField($model, $property, $options).
        Html::closeTag('div');
    }
48862
public function renderForm(Model $model, array $config)
    {
        $form = null;
        foreach ($config as $attribute => $options) {
            $form .= $this->renderField($model, $attribute, $options);
        }

        return $form;
    }
400078
public function monthFieldRow(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::openTag('div', $this->getBlock('block', $options)).
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
        $this->monthField($model, $property, $options).
        Html::closeTag('div');
    }
1101550
public function passwordFieldRow(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        return Html::openTag('div', $this->getBlock('block', $options)).
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
        $this->passwordField($model, $property, $options).
        Html::closeTag('div');
    }
328141
public function displayData(OutputInterface $output, array $data, $property = null)
    {
        $key = null;

        if ($property) {
            $parents = explode('.', $property);
            $key = end($parents);
            $data = NestedArrayUtil::getNestedArrayValue($data, $parents, $keyExists);
            if (!$keyExists) {
                throw new \InvalidArgumentException('Property not found: ' . $property);
            }
        }

        if (!is_string($data)) {
            $output->write(Yaml::dump($data, 5, 4, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
        } else {
            $output->writeln($this->format($data, $key));
        }
    }
1036436
public function dropDownListField(IFormModel $model, $property, array $options = [])
    {
        $element = $this->getField($model, $property);
        $options['id'] = $element['id'];

        if (!empty($element['value'])) {
            $options['selected'] = $element['value'];
        }

        return Html::dropDownList($element['name'], $this->getBlock('elements', $options), $options);
    }
1181583
private function render(string $view, array $options = []): string
    {
        extract($options, EXTR_OVERWRITE);

        ob_start();
        require $this->getFilename($view);

        return ob_get_clean();
    }