Documentation

Sesha_Entity_PropertyMapper extends Horde_Rdo_Mapper
in package

The Sesha_Entity_PropertyMapper class contains all functions related to handling property mapping in Sesha.

Copyright 2012-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Tags
author

Ralf Lang lang@b1-systems.de

category

Horde

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

$_lazyRelationships  : array<string|int, mixed>
Relationships loaded on-demand
$_table  : string
Inflector doesn't support Horde-style tables yet
create()  : Sesha_Entity_Property
Creates a property definition in the backend.
delete()  : int
Deletes a property definition from the backend. $object can be either a primary key, an Rdo_Query object, or a Sesha_Entity_Property object.

Properties

$_lazyRelationships

Relationships loaded on-demand

protected array<string|int, mixed> $_lazyRelationships = array('categories' => array('type' => Horde_Rdo::MANY_TO_MANY, 'mapper' => 'Sesha_Entity_CategoryMapper', 'through' => 'sesha_relations'), 'values' => array('type' => Horde_Rdo::ONE_TO_MANY, 'mapper' => 'Sesha_Entity_ValueMapper', 'foreignKey' => 'property_id'))
Tags
access

protected

$_table

Inflector doesn't support Horde-style tables yet

protected string $_table = 'sesha_properties'
Tags
access

protected

Methods

create()

Creates a property definition in the backend.

public create(array<string|int, mixed> $property) : Sesha_Entity_Property

This wraps folding of the 'parameters' structure

Parameters
$property : array<string|int, mixed>

An array with the property definition. Keys may be property_id Integer (autogenerated) property string The property name datatype string The property type parameters mixed Type definition parameters will be serialized unit string The unit to display description string priority integer

Return values
Sesha_Entity_Property

The property created.

delete()

Deletes a property definition from the backend. $object can be either a primary key, an Rdo_Query object, or a Sesha_Entity_Property object.

public delete(string|Sesha_Entity_Property|Horde_Rdo_Query $object) : int

This also cleans up attachment attributes of this property type and category links

Parameters
$object : string|Sesha_Entity_Property|Horde_Rdo_Query

The Rdo object, Horde_Rdo_Query, or unique id to delete.

Return values
int

Number of objects deleted.

Search results