function FieldsRSIPreventor::__construct in Media Gallery 7.2
Same name and namespace in other branches
- 7 fields_rsi_prevention.inc \FieldsRSIPreventor::__construct()
File
- ./
fields_rsi_prevention.inc, line 27 - This file provides easier access on entity properties and methods.
Class
- FieldsRSIPreventor
- Decorates an entity to provide getters/setters.
Code
function __construct($entity) {
// Prevent this thing from chaining if people accidentally use it twice.
if ($entity instanceof FieldRSIPreventor) {
$entity = $entity->entity;
}
$this->entity = $entity;
}