Documentation

PhpDataTypeSpecTrait uses trait:short

Describe what values are allowed to be stored in this field.

This trait is used to track a PHP-style field which is mapped ot a entity-style field. Thus, it has both PHP's @var ($type) and entity's @dataType ($dataType).

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Properties

$dataType  : string
The type of data stored in this field.
$dfkEntities  : string
$fkColumn  : array<string|int, mixed>
$fkEntity  : string
$serialize  : int
$type  : array<string|int, string>
The PHP
$typeAliases  : array<string|int, mixed>
Aliases for the valid data types

Methods

getDataType()  : string
getDfkEntities()  : array<string|int, mixed>|null
getFkColumn()  : string|null
getFkEntity()  : string
getSerialize()  : int
getType()  : array<string|int, string>
setDataType()  : $this
setDfkEntities()  : $this
setFkColumn()  : $this
setFkEntity()  : $this
setSerialize()  : $this
setType()  : $this
getValidDataTypes()  : array<string|int, mixed>
Add valid types that are not not part of \CRM_Utils_Type::dataTypes

Properties

$dataType

The type of data stored in this field.

public string $dataType

Ex: 'Integer', 'Boolean', 'Float', 'String', 'Text', 'Blob'

$serialize

public int $serialize
Tags
see

CRM_Core_DAO::SERIALIZE_SEPARATOR_BOOKEND, CRM_Core_DAO::SERIALIZE_JSON, etc

$typeAliases

Aliases for the valid data types

public static array<string|int, mixed> $typeAliases = ['Int' => 'Integer', 'Link' => 'Url', 'Memo' => 'Text']

Methods

getDfkEntities()

public getDfkEntities() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getType()

public getType() : array<string|int, string>
Return values
array<string|int, string>

setDfkEntities()

public setDfkEntities(array<string|int, mixed>|null $dfkEntities) : $this
Parameters
$dfkEntities : array<string|int, mixed>|null
Return values
$this

setFkColumn()

public setFkColumn(string $fkColumn) : $this
Parameters
$fkColumn : string
Return values
$this

setFkEntity()

public setFkEntity(string $fkEntity) : $this
Parameters
$fkEntity : string
Return values
$this

setSerialize()

public setSerialize(int|string|null $serialize) : $this
Parameters
$serialize : int|string|null
Return values
$this

setType()

public setType(string|array<string|int, string> $type) : $this
Parameters
$type : string|array<string|int, string>
Tags
throws
Exception
Return values
$this

getValidDataTypes()

Add valid types that are not not part of \CRM_Utils_Type::dataTypes

protected getValidDataTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results