ComponentVariable is the read-only default variable for tailor components.

  • IteratorAggregate
  • ArrayAccess
  • October\Contracts\Twig\CallsAnyMethod
  • JsonSerializable
  • Traversable

Protected Properties

protected Cms\Classes\ComponentBase $component

protected Model $record

protected bool $isRecordLoaded

Public Methods

public __call()

public __call($method, $parameters): void

public __construct()

public __construct($component): void

public __get()

public __get($key): void

__get attributes on the component

public __isset()

public __isset($key): void

__isset forces explicit method calls

public getComponent()

public getComponent(): void

public getIterator()

public getIterator(): Traversable 

getIterator for the records, this allows empty checks.

public getRecord()

public getRecord(): void

public getRecordQuery()

public getRecordQuery(): void

public jsonSerialize()

public jsonSerialize(): array 

jsonSerialize converts the object into something JSON serializable.

public offsetExists()

public offsetExists($offset): bool 

offsetExists implementation

public offsetGet()

public offsetGet($offset): mixed 

offsetGet implementation

public offsetSet()

public offsetSet($offset, $value): void 

offsetSet is disabled (read-only)

public offsetUnset()

public offsetUnset($offset): void 

offsetUnset is disabled (read-only)

public toArray()

public toArray(): array 

toArray convert the variable to an array.

Protected Methods

protected forwardCallTo()

protected forwardCallTo(
    mixed $object,
    string $method,
    array $parameters
): mixed 

Forward a method call to the given object.

protected forwardDecoratedCallTo()

protected forwardDecoratedCallTo(
    mixed $object,
    string $method,
    array $parameters
): mixed 

Forward a method call to the given object, returning $this if the forwarded call returned itself.

protected loadRecord()

protected loadRecord(): void

protected static throwBadMethodCallException()

protected static throwBadMethodCallException(string $method): void 

Throw a bad method call exception for the given method.