extends |
Control |
|---|
| Methods | ||
|---|---|---|
protected
|
init(): void
|
# |
public
|
setModel(Model $model): void
|
# |
protected
|
buildQuery(Model $model): void
|
# |
protected
|
addFieldRule(Field $field): void
|
# |
protected
|
getLookupProps(Field $field): array
|
# |
protected
|
getDatePickerProps(Field $field): array
|
# |
protected
|
addReferenceRules(Field $field): void
|
# |
protected
|
getRule(string $type, array $defaults = [], Field $field = null): array
|
# |
protected
|
getFieldItems(Field $field, ?int $limit = 250): array
|
# |
protected
|
getChoices(Field $field, array $options = []): array
|
# |
protected
|
renderView(): void
|
# |
public
|
queryToScope(array $query): AbstractScope
|
# |
public
|
queryToCondition(array $query): Condition
|
# |
public
|
scopeToQuery(AbstractScope $scope, array $inputsMap = []): array
|
# |
public
|
conditionToQuery(Condition $condition, array $inputsMap = []): array
|
# |
protected
|
getConditionOption(string $type, mixed $value, Condition $condition): ?array
|
# |
public
|
detectDelimiter(string $value): non-empty-string
|
# |
| Methods inherited from Atk4\Ui\Form\Control |
|---|
set(), renderTemplateToHtml(), onChange(), jsInput() |
| Methods inherited from Atk4\Ui\AbstractView |
|---|
getOwner() |
| Methods used from Atk4\Core\AppScopeTrait |
|---|
assertInstanceOfApp(), issetApp(), getApp(), setApp() |
| Methods used from Atk4\Core\ContainerTrait |
|---|
_uniqueElementName(), _addContainer(), removeElement(), _shorten(), getElement(), hasElement() |
| Methods used from Atk4\Core\InitializerTrait |
|---|
isInitialized(), assertIsInitialized(), invokeInit() |
| Methods used from Atk4\Core\StaticAddToTrait |
|---|
_addToAdd(), addTo(), addToWithCl(), addToWithClUnsafe() |
| Methods used from Atk4\Core\TrackableTrait |
|---|
issetOwner(), setOwner(), unsetOwner(), getDesiredName(), destroy() |
| Properties | |||
|---|---|---|---|
public
|
|
$renderLabel = false
|
# |
public
|
array
|
$options = ['enum' => ['limit' => 250], 'debug' => false]
|
# |
public
|
int
|
$maxDepth = 5
|
# |
public
|
array
|
$fields = []
|
# |
public
|
HtmlTemplate|null
|
$scopeBuilderTemplate
|
# |
public
static
|
array
|
$listDelimiters = [';', ',']
|
# |
public
|
array
|
$atkdDateOptions = ['flatpickr' => []]
|
# |
public
|
array
|
$atkLookupOptions = ['ui' => 'small basic button']
|
# |
protected
|
View
|
$scopeBuilderView
|
# |
protected
|
array
|
$rules = []
|
# |
public
|
array
|
$labels = []
|
# |
protected
|
array
|
$query = []
|
# |
protected
static
|
array<string, array<string, string>>
|
$operatorsMap = [
'number' => [
self::OPERATOR_SIGN_EQUALS => Condition::OPERATOR_EQUALS,
self::OPERATOR_SIGN_DOESNOT_EQUAL => Condition::OPERATOR_DOESNOT_EQUAL,
self::OPERATOR_SIGN_GREATER => Condition::OPERATOR_GREATER,
self::OPERATOR_SIGN_GREATER_EQUAL => Condition::OPERATOR_GREATER_EQUAL,
self::OPERATOR_SIGN_LESS => Condition::OPERATOR_LESS,
self::OPERATOR_SIGN_LESS_EQUAL => Condition::OPERATOR_LESS_EQUAL,
],
'date' => self::DATE_OPERATORS_MAP,
'time' => self::DATE_OPERATORS_MAP,
'datetime' => self::DATE_OPERATORS_MAP,
'text' => [
self::OPERATOR_TEXT_EQUALS => Condition::OPERATOR_EQUALS,
self::OPERATOR_TEXT_DOESNOT_EQUAL => Condition::OPERATOR_DOESNOT_EQUAL,
self::OPERATOR_TEXT_GREATER => Condition::OPERATOR_GREATER,
self::OPERATOR_TEXT_GREATER_EQUAL => Condition::OPERATOR_GREATER_EQUAL,
self::OPERATOR_TEXT_LESS => Condition::OPERATOR_LESS,
self::OPERATOR_TEXT_LESS_EQUAL => Condition::OPERATOR_LESS_EQUAL,
self::OPERATOR_TEXT_CONTAINS => Condition::OPERATOR_LIKE,
self::OPERATOR_TEXT_DOESNOT_CONTAIN => Condition::OPERATOR_NOT_LIKE,
self::OPERATOR_TEXT_BEGINS_WITH => Condition::OPERATOR_LIKE,
self::OPERATOR_TEXT_DOESNOT_BEGIN_WITH => Condition::OPERATOR_NOT_LIKE,
self::OPERATOR_TEXT_ENDS_WITH => Condition::OPERATOR_LIKE,
self::OPERATOR_TEXT_DOESNOT_END_WITH => Condition::OPERATOR_NOT_LIKE,
self::OPERATOR_IN => Condition::OPERATOR_IN,
self::OPERATOR_NOT_IN => Condition::OPERATOR_NOT_IN,
self::OPERATOR_TEXT_MATCHES_REGEX => Condition::OPERATOR_REGEXP,
self::OPERATOR_TEXT_DOESNOT_MATCH_REGEX => Condition::OPERATOR_NOT_REGEXP,
self::OPERATOR_EMPTY => Condition::OPERATOR_EQUALS,
self::OPERATOR_NOT_EMPTY => Condition::OPERATOR_DOESNOT_EQUAL,
],
'select' => [
self::OPERATOR_EQUALS => Condition::OPERATOR_EQUALS,
self::OPERATOR_DOESNOT_EQUAL => Condition::OPERATOR_DOESNOT_EQUAL,
],
'lookup' => [
self::OPERATOR_EQUALS => Condition::OPERATOR_EQUALS,
self::OPERATOR_DOESNOT_EQUAL => Condition::OPERATOR_DOESNOT_EQUAL,
],
]
|
# |
protected
static
|
array<string, string|array<string, mixed>>
|
$ruleTypes = [
'default' => 'text',
'text' => [
'type' => 'text',
'operators' => [
self::OPERATOR_TEXT_EQUALS,
self::OPERATOR_TEXT_DOESNOT_EQUAL,
self::OPERATOR_TEXT_GREATER,
self::OPERATOR_TEXT_GREATER_EQUAL,
self::OPERATOR_TEXT_LESS,
self::OPERATOR_TEXT_LESS_EQUAL,
self::OPERATOR_TEXT_CONTAINS,
self::OPERATOR_TEXT_DOESNOT_CONTAIN,
self::OPERATOR_TEXT_BEGINS_WITH,
self::OPERATOR_TEXT_DOESNOT_BEGIN_WITH,
self::OPERATOR_TEXT_ENDS_WITH,
self::OPERATOR_TEXT_DOESNOT_END_WITH,
self::OPERATOR_TEXT_MATCHES_REGEX,
self::OPERATOR_TEXT_DOESNOT_MATCH_REGEX,
self::OPERATOR_IN,
self::OPERATOR_NOT_IN,
self::OPERATOR_EMPTY,
self::OPERATOR_NOT_EMPTY,
],
],
'lookup' => [
'type' => 'custom-component',
'inputType' => 'lookup',
'component' => 'AtkLookup',
'operators' => self::ENUM_OPERATORS,
'componentProps' => [__CLASS__, 'getLookupProps'],
],
'enum' => [
'type' => 'select',
'inputType' => 'select',
'operators' => self::ENUM_OPERATORS,
'choices' => [__CLASS__, 'getChoices'],
],
'numeric' => [
'type' => 'text',
'inputType' => 'number',
'operators' => [
self::OPERATOR_SIGN_EQUALS,
self::OPERATOR_SIGN_DOESNOT_EQUAL,
self::OPERATOR_SIGN_GREATER,
self::OPERATOR_SIGN_GREATER_EQUAL,
self::OPERATOR_SIGN_LESS,
self::OPERATOR_SIGN_LESS_EQUAL,
self::OPERATOR_EMPTY,
self::OPERATOR_NOT_EMPTY,
],
],
'boolean' => [
'type' => 'radio',
'operators' => [],
'choices' => [['label' => 'Yes', 'value' => '1'], ['label' => 'No', 'value' => '0']],
],
'date' => [
'type' => 'custom-component',
'component' => 'AtkDatePicker',
'inputType' => 'date',
'operators' => self::DATE_OPERATORS,
'componentProps' => [__CLASS__, 'getDatePickerProps'],
],
'datetime' => [
'type' => 'custom-component',
'component' => 'AtkDatePicker',
'inputType' => 'datetime',
'operators' => self::DATE_OPERATORS,
'componentProps' => [__CLASS__, 'getDatePickerProps'],
],
'time' => [
'type' => 'custom-component',
'component' => 'AtkDatePicker',
'inputType' => 'time',
'operators' => self::DATE_OPERATORS,
'componentProps' => [__CLASS__, 'getDatePickerProps'],
],
'integer' => 'numeric',
'float' => 'numeric',
'atk4_money' => 'numeric',
'checkbox' => 'boolean',
]
|
# |
| Properties inherited from Atk4\Ui\Form\Control |
|---|
$form, $entityField, $controlClass, $layoutWrap, $width, $caption, $hint, $disabled, $readOnly |
| Properties inherited from Atk4\Ui\View |
|---|
$_jsActions, $model, $region, $ui, $class, $style, $attr, $template, $defaultTemplate, $content, $element, $executorFactory, $stickyArgs |
| Properties inherited from Atk4\Ui\AbstractView |
|---|
$_addLater, $_rendered, $elements |
| Properties used from Atk4\Core\AppScopeTrait |
|---|
$_app, $maxNameLength, $uniqueNameHashes |
| Properties used from Atk4\Core\ContainerTrait |
|---|
$_elementNameCounts |
| Properties used from Atk4\Core\InitializerTrait |
|---|
$_initialized |
| Properties used from Atk4\Core\NameTrait |
|---|
$name |
| Properties used from Atk4\Core\TrackableTrait |
|---|
$_owner, $shortName |