Overview

Namespaces

  • DcGeneral
    • Clipboard
    • Contao
      • Callback
      • Compatibility
      • DataDefinition
        • Definition
      • Dca
        • Builder
          • Legacy
        • Definition
        • Palette
        • Populator
      • Event
      • View
        • Contao2BackendView
          • Event
    • Controller
    • Data
    • DataDefinition
      • Builder
      • Definition
        • Properties
        • View
          • Panel
      • ModelRelationship
      • Palette
        • Builder
          • Event
        • Condition
          • Palette
          • Property
    • EnvironmentPopulator
    • Event
    • Exception
    • Factory
      • Event
    • Panel
    • View
      • Event

Classes

  • AbstractCondition
  • ParentChildCondition
  • RootCondition

Interfaces

  • ParentChildConditionInterface
  • RootConditionInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class ParentChildCondition

Default implementation of a parent child relationship.

DcGeneral\DataDefinition\ModelRelationship\AbstractCondition
Extended by DcGeneral\DataDefinition\ModelRelationship\ParentChildCondition implements DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface
Namespace: DcGeneral\DataDefinition\ModelRelationship
Package: DcGeneral\DataDefinition\ModelRelationship
Located at DataDefinition/ModelRelationship/ParentChildCondition.php
Methods summary
public DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface
# setFilterArray( array $value )

Set the condition as filter.

Set the condition as filter.

Parameters

$value
array
$value The filter rules describing the relationship.

Returns

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::setFilterArray()
public array
# getFilterArray( )

Get the condition as filter.

Get the condition as filter.

Returns

array

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::getFilterArray()
public DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface
# setSetters( array $value )

Set the condition setters.

Set the condition setters.

Parameters

$value
array
$value The values to be applied to a model when it shall get set as child of another one.

Returns

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::setSetters()
public array
# getSetters( )

Get the condition setters.

Get the condition setters.

Returns

array

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::getSetters()
public DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface
# setInverseFilterArray( array $value )

Set the inverse filter for the condition.

Set the inverse filter for the condition.

Parameters

$value
array
$value The filter rules to use when inverting the condition to look up the parent.

Returns

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::setInverseFilterArray()
public array
# getInverseFilterArray( )

Get the inverse filter for the condition.

Get the inverse filter for the condition.

Returns

array

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::getInverseFilterArray()
public DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface
# setSourceName( string $value )

Set the name of the source provider.

Set the name of the source provider.

Parameters

$value
string
$value The name of the provider.

Returns

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::setSourceName()
public string
# getSourceName( )

Return the name of the source provider (parent).

Return the name of the source provider (parent).

Returns

string

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::getSourceName()
public DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface
# setDestinationName( string $value )

Set the name of the destination provider (child).

Set the name of the destination provider (child).

Parameters

$value
string
$value The name of the provider.

Returns

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::setDestinationName()
public string
# getDestinationName( )

Return the name of the destination provider.

Return the name of the destination provider.

Returns

string

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::getDestinationName()
public array
# getFilter( ModelInterface $objParent )

Get the condition as filter related to the given model.

Get the condition as filter related to the given model.

Parameters

$objParent
ModelInterface
$objParent The model that shall get used as parent.

Returns

array

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
when an empty parent model is given.

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::getFilter()
public
# applyTo( ModelInterface $objParent, ModelInterface $objChild )

Apply a condition to a child.

Apply a condition to a child.

Parameters

$objParent
ModelInterface
$objParent The parent object.
$objChild
ModelInterface
$objChild The object on which the condition shall be enforced on.

Throws

DcGeneral\Exception\DcGeneralRuntimeException
For invalid setters.

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::applyTo()
public
# copyFrom( ModelInterface $sourceModel, ModelInterface $destinationModel )

Apply a condition to a child by copying it from another child.

Apply a condition to a child by copying it from another child.

Parameters

$sourceModel
ModelInterface
$sourceModel The sibling model.
$destinationModel
ModelInterface
$destinationModel The model on which the condition shall be enforced on.

Throws

DcGeneral\Exception\DcGeneralRuntimeException
For invalid setters.

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::copyFrom()
public array|null
# getInverseFilterFor( ModelInterface $objChild )

Get the inverted condition as filter.

Get the inverted condition as filter.

Parameters

$objChild
ModelInterface
$objChild The model that shall get used as child and for which the parent filter shall get retrieved.

Returns

array|null

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::getInverseFilterFor()
public boolean
# matches( ModelInterface $objParent, ModelInterface $objChild )

Test if the given parent is indeed a parent of the given child object for this condition.

Test if the given parent is indeed a parent of the given child object for this condition.

Parameters

$objParent
ModelInterface
$objParent The parent model.
$objChild
ModelInterface
$objChild The child model.

Returns

boolean

Implementation of

DcGeneral\DataDefinition\ModelRelationship\ParentChildConditionInterface::matches()
Methods inherited from DcGeneral\DataDefinition\ModelRelationship\AbstractCondition
checkAndFilter(), checkCondition(), checkOrFilter()
Properties summary
protected array $filter
#

The filter rules.

The filter rules.

protected array $inverseFilter
#

The filter rules to use for an inverse filter.

The filter rules to use for an inverse filter.

protected array $setOn
#

The values to use when enforcing a root condition.

The values to use when enforcing a root condition.

protected string $sourceProvider
#

The name of the source provider (parent).

The name of the source provider (parent).

protected string $destinationProvider
#

The name of the destination provider (child).

The name of the destination provider (child).

contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0