Backend\Behaviors\FormController\HasRenderers
Public Methods
public formHasOutsideFields()
public formHasOutsideFields(): bool
formHasOutsideFields is a view helper to check if a form tab has fields in the non-tabbed section (outside fields).
<?php if ($this->formHasOutsideFields()): ?>
<!-- Do something -->
<?php endif ?>
public formHasPrimaryTabs()
public formHasPrimaryTabs(): bool
formHasPrimaryTabs is a view helper to check if a form tab has fields in the primary tab section.
<?php if ($this->formHasPrimaryTabs()): ?>
<!-- Do something -->
<?php endif ?>
public formHasSecondaryTabs()
public formHasSecondaryTabs(): bool
formHasSecondaryTabs is a view helper to check if a form tab has fields in the secondary tab section.
<?php if ($this->formHasSecondaryTabs()): ?>
<!-- Do something -->
<?php endif ?>
public formRefreshFields()
public formRefreshFields(array|string $names): array
formRefreshField is a view helper to render a field from AJAX based on their field names.
public formRenderField()
public formRenderField(string $name, array $options = []): string
formRenderField is a view helper to render a single form field.
<?= $this->formRenderField('field_name') ?>
public formRenderOutsideFields()
public formRenderOutsideFields($options = []): string
formRenderOutsideFields is a view helper to render the form fields belonging to the non-tabbed section (outside form fields).
<?= $this->formRenderOutsideFields() ?>
public formRenderPreview()
public formRenderPreview(): string
formRenderPreview is a view helper to render the form in preview mode.
<?= $this->formRenderPreview() ?>
public formRenderPrimaryTab()
public formRenderPrimaryTab($tabName, $options = []): void
formRenderPrimaryTab renders the contents of a primary tab
public formRenderPrimaryTabs()
public formRenderPrimaryTabs($options = []): string
formRenderPrimaryTabs is a view helper to render the form fields belonging to the primary tabs section.
<?= $this->formRenderPrimaryTabs() ?>
public formRenderSecondaryTab()
public formRenderSecondaryTab($tabName, $options = []): void
formRenderSecondaryTab renders the contents of a secondary tab
public formRenderSecondaryTabs()
public formRenderSecondaryTabs($options = []): string
formRenderSecondaryTabs is a view helper to render the form fields belonging to the secondary tabs section.
<?= $this->formRenderPrimaryTabs() ?>