ePages 6.10 - DE_EPAGES/Search/API/Object/SearchTerm.pm

Package DE_EPAGES::Search::API::Object::SearchTerm

object interface for SearchTerm.

Base
DE_EPAGES::Object::API::Object::BaseObject

Functions

delete
deleteSelf
exists
exportableAttributes
get
insert
load
set

delete

Deletes this object, therefore the hook 'OBJ_DeleteSearchTerm' is triggered.

Syntax
$SearchTerm->delete;
Hook
OBJ_DeleteSearchTerm
hook parameter keys :
  • Object - this object - object
  • SearchTermID - search term id - int

deleteSelf

Deletes the object at database tables.

Syntax
$SearchTerm->deleteSelf;

exists

Returns true if the object exists in the database.

Syntax
$Exists = $SearchTerm->exists;
Return
$Exists (boolean)
true if the object exists

exportableAttributes

Returns all attribute values that have an existing (not-null) value. Unlike $Object->_attributes this function returns localized attribute values as hash reference (language id => value).

Syntax
$hValues = $Object->exportableAttributes
Example
$Description = $Object->exportableAttributes;
Return
$hValues (hash ref)
object attributes as key => value pairs

get

Returns one or more attribute values.

Syntax
$Value = $SearchTerm->get( $Name );
$hValues = $SearchTerm->get( $aNames );
Example
$Password = $SearchTerm->get( 'Password' );
$Password = $SearchTerm->get( ['Login', 'Password'] )->{'Password'};
Input
$Name (string)
attribute name
$aNames (array ref)
list of attribute names
Return
$hValues (hash ref)
name => value pairs
$Value (string (or other))
attribute value

insert

Insert this info as object, afterwards the hook 'OBJ_InsertSearchTerm' is triggered.

Syntax
$SearchTerm = DE_EPAGES::Search::API::Object::SearchTerm->insert($hInfo);
Example
my $Class = LoadClassByAlias('SearchTerm');
my $SearchTerm = $Class->insertObject($hInfo);
Input
$Package (string)
class package
$hInfo (ref.hash)
attributes of new object
Return
$SearchTerm (object)
new object
Hook
OBJ_InsertSearchTerm
hook parameter keys :
  • Object - this object - object
  • SearchTermID - search term id - int

load

Loads an existing object.

Syntax
$SearchTerm = $Package->load( $ObjectID );
Input
$Package (string)
class package
$ObjectID (int)
object id
Return
$SearchTerm (object)
existing object

set

This function triggers hooks 'OBJ_BeforeUpdateSearchTerm' and 'OBJ_AfterUpdateSearchTerm'.

Syntax
$SearchTerm->set($hValues, $LanguageID);
Hook
OBJ_BeforeUpdateSearchTerm
hook parameter keys :
  • Object - this object - object
  • SearchTermID - search term id - int
  • Values - new values for object - ref.hash
  • LanguageID - values of this language will be updated - int
OBJ_AfterUpdateSearchTerm
hook parameter keys :
  • Object - this object - object
  • SearchTermID - search term id - int
  • Values - updated values - ref.hash
  • LanguageID - values updated of this language - int