Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZMediaAttribute Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| get ( $id=-1)
& | getAll ()
| delete ()
| id ()
& | name ()
& | defaultValue ()
& | unit ()
& | type ()
| setName ( $value)
| setDefaultValue (&$value)
| setUnit (&$value)
| setType (&$type)
| setValue (&$media, &$value)
& | value (&$media)
| moveUp ()
| moveDown ()

## Public Attributes
| $ID
| $TypeID
| $Name
| $Placement
| $Unit
| $DefaultValue

## Detailed Description

! eZMediaAttribute eZMediaAttribute handles the attributes for a media.

Example code:

// create a new country type and set some variables.
$attribute = new eZMediaAttribute();
$attribute->setName( "autoplay" );
$attribute->setValue( true );
$attribute->setType( $type );
$attribute->store();
eZMediaAttribute
Definition: ezmediaattribute.php:49
$type
$type
Definition: classes/admin/linkselect.php:220

See also
  eZMedia eZMediaType eZMediaCategory

Definition at line 48 of file ezmediaattribute.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZMediaAttribute::__construct | ( |  | $id = `-1` | ) |

Constructs a new eZMediaAttribute object. Retrieves the data from the database if a valid id is given as an argument.

Definition at line 54 of file ezmediaattribute.php.

References $id, and $ID.

## Member Function Documentation

## ◆ defaultValue()

& eZMediaAttribute::defaultValue | ( |  | ) |

Returns the devault value of the attribute.

Definition at line 209 of file ezmediaattribute.php.

References $DefaultValue.

## ◆ delete()

eZMediaAttribute::delete | ( |  | ) |

Deletes a option from the database.

Definition at line 176 of file ezmediaattribute.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ get()

eZMediaAttribute::get | ( |  | $id = `-1` | ) |

Fetches the media attribute object values from the database.

Definition at line 129 of file ezmediaattribute.php.

References $db, $id, eZDB\globalDatabase(), and Name.

## ◆ getAll()

& eZMediaAttribute::getAll | ( |  | ) |

Retrieves every option from the database.

Definition at line 156 of file ezmediaattribute.php.

References $db, $i, and eZDB\globalDatabase().

## ◆ id()

eZMediaAttribute::id | ( |  | ) |

Returns the object ID to the option. This is the unique ID stored in the database.

Definition at line 192 of file ezmediaattribute.php.

References $ID.

## ◆ moveDown()

eZMediaAttribute::moveDown | ( |  | ) |

Moves this item down one step in the order list, this means that it will swap place with the item below.

Definition at line 361 of file ezmediaattribute.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ moveUp()

eZMediaAttribute::moveUp | ( |  | ) |

Moves this item up one step in the order list, this means that it will swap place with the item above.

Definition at line 338 of file ezmediaattribute.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ name()

& eZMediaAttribute::name | ( |  | ) |

Returns the name of the attribute.

Definition at line 200 of file ezmediaattribute.php.

References $Name, and Name.

## ◆ setDefaultValue()

eZMediaAttribute::setDefaultValue | ( | & | $value | ) |

Sets the default value of the attribute.

Definition at line 243 of file ezmediaattribute.php.

## ◆ setName()

eZMediaAttribute::setName | ( |  | $value | ) |

Sets the name of the attribute.

Definition at line 235 of file ezmediaattribute.php.

References Name.

## ◆ setType()

eZMediaAttribute::setType | ( | & | $type | ) |

Sets the type of the attribute.

Definition at line 259 of file ezmediaattribute.php.

References $type.

## ◆ setUnit()

eZMediaAttribute::setUnit | ( | & | $value | ) |

Sets the measuring unit of the attribute.

Definition at line 251 of file ezmediaattribute.php.

## ◆ setValue()

eZMediaAttribute::setValue | ( | & | $media,
|  | & | $value
| ) |  |

Sets the attribute value for the given media.

Definition at line 270 of file ezmediaattribute.php.

References $db, $media, $res, and eZDB\globalDatabase().

## ◆ store()

eZMediaAttribute::store | ( |  | ) |

Stores a eZMediaattribute object to the database.

Definition at line 66 of file ezmediaattribute.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ type()

& eZMediaAttribute::type | ( |  | ) |

Returns the type of the attribute.

Definition at line 225 of file ezmediaattribute.php.

References $type.

## ◆ unit()

& eZMediaAttribute::unit | ( |  | ) |

Returns the measuring unit of the attribute.

Definition at line 217 of file ezmediaattribute.php.

References $Unit.

## ◆ value()

& eZMediaAttribute::value | ( | & | $media | ) |

Returns the attribute value to the given media.

Definition at line 314 of file ezmediaattribute.php.

References $db, $media, $ret, and eZDB\globalDatabase().

## Member Data Documentation

## ◆ $DefaultValue

eZMediaAttribute::$DefaultValue

Definition at line 385 of file ezmediaattribute.php.

Referenced by defaultValue().

## ◆ $ID

eZMediaAttribute::$ID

Definition at line 380 of file ezmediaattribute.php.

Referenced by __construct(), and id().

## ◆ $Name

eZMediaAttribute::$Name

Definition at line 382 of file ezmediaattribute.php.

Referenced by name().

## ◆ $Placement

eZMediaAttribute::$Placement

Definition at line 383 of file ezmediaattribute.php.

## ◆ $TypeID

eZMediaAttribute::$TypeID

Definition at line 381 of file ezmediaattribute.php.

## ◆ $Unit

eZMediaAttribute::$Unit

Definition at line 384 of file ezmediaattribute.php.

Referenced by unit().

The documentation for this class was generated from the following file:

- ezmediaattribute.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.