BEdita API doc | 4-cactus
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download

Namespaces

  • BEdita
    • API
      • Auth
      • Controller
        • Admin
        • Component
        • Model
      • Error
      • Event
      • Exception
      • Middleware
      • Model
        • Action
      • Network
        • Exception
      • Shell
      • TestSuite
      • Utility
    • Core
      • Configure
        • Engine
      • Database
        • Type
      • Exception
      • Filesystem
        • Adapter
        • Exception
        • Thumbnail
      • I18n
      • Job
        • Service
      • Mailer
        • Preview
        • Transport
      • Model
        • Action
        • Behavior
        • Entity
        • Table
        • Validation
      • ORM
        • Inheritance
        • Locator
        • Rule
      • Shell
        • Task
      • State
      • TestSuite
        • Fixture
      • Utility

Classes

  • CategoriesBehavior
  • DataCleanupBehavior
  • GeometryBehavior
  • ObjectModelBehavior
  • ObjectTypeBehavior
  • RelationsBehavior
  • SearchableBehavior
  • UniqueNameBehavior
  • UploadableBehavior
  • UserModifiedBehavior

Class RelationsBehavior

Relations behavior

Cake\ORM\Behavior
Extended by BEdita\Core\Model\Behavior\RelationsBehavior
Namespace: BEdita\Core\Model\Behavior
Located at Core/src/Model/Behavior/RelationsBehavior.php

Methods summary

public
# initialize( array $config )
protected BEdita\Core\Model\Entity\ObjectType
# objectType( ... $args )

Getter for object type.

Getter for object type.

Parameters

$args
Method arguments.

Returns

BEdita\Core\Model\Entity\ObjectType
protected Cake\ORM\Association
# relatedTo( string $associated, array $options = [] )

Creates a new RelatedTo association between this table and a target table. A "belongs to many" association is a M-N relationship.

Creates a new RelatedTo association between this table and a target table. A "belongs to many" association is a M-N relationship.

Target table can be inferred by its name, which is provided in the first argument, or you can either pass the class name to be instantiated or an instance of it directly.

The options array accept the same keys as \Cake\ORM\Table::belongsToMany().

This method will return the association object that was built.

Parameters

$associated

The alias for the target table. This is used to uniquely identify the association.

$options
List of options to configure the association definition.

Returns

Cake\ORM\Association
public
# setupRelations( string|integer|null $objectType = null )

Set up relations for the current table.

Set up relations for the current table.

Parameters

$objectType
Object type name or ID.
public BEdita\Core\Model\Entity\Relation[]
# getRelations( )

Get a list of all available relations indexed by their name with regards of side.

Get a list of all available relations indexed by their name with regards of side.

Deprecated

Use ObjectType::getRelations() instead.

Returns

BEdita\Core\Model\Entity\Relation[]

Properties summary

protected array $_defaultConfig
# [ 'implementedMethods' => [ 'setupRelations' => 'setupRelations', 'getRelations' => 'getRelations', ], ]
BEdita API doc | 4-cactus API documentation generated by ApiGen