Skip to content
Code-Schnipsel Gruppen Projekte
Commit f57424a9 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

get instance of -> into bricks

Übergeordneter ec390335
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -61,15 +61,15 @@ public function __construct($params = array())
{
// default
$default = array(
'type' => 'content',
'content' => '',
'title' => '',
'type' => 'content',
'content' => '',
'title' => '',
'description' => '',
'project' => '',
'areas' => '',
'height' => '',
'width' => '',
'classes' => ''
'project' => '',
'areas' => '',
'height' => '',
'width' => '',
'classes' => ''
);
$this->setAttributes($default);
......@@ -154,6 +154,23 @@ public function getType()
return get_class($this);
}
/**
* Checks if the internal control is of this class or has this class as one of its parents
*
* @param string $className
* @return bool
*/
public function isInstanceOf($className)
{
$Control = $this->getControl();
if (is_object($Control)) {
return $Control instanceof $className;
}
return $this instanceof $className;
}
/**
* Check, if control canbe created
*
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren