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

code style

Übergeordneter 4052cc7e
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
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);
......@@ -85,7 +85,7 @@ public function __construct($params = array())
}
// default settings from control
$Control = $this->_getControl();
$Control = $this->getControl();
$Manager = Manager::init();
$availableSettings = $Manager->getAvailableBrickSettingsByBrickType(
......@@ -145,7 +145,7 @@ public function __construct($params = array())
*/
public function getType()
{
$Control = $this->_getControl();
$Control = $this->getControl();
if (is_object($Control)) {
return get_class($Control);
......@@ -166,7 +166,7 @@ public function check()
return $this;
}
$Control = $this->_getControl();
$Control = $this->getControl();
if (!$Control) {
throw new QUI\Exception('Control not found. Brick could not be created');
......@@ -178,7 +178,9 @@ public function check()
/**
* Return the HTML of the Brick
*
* @throw QUI\Exception
* @return string
*
* @throws QUI\Exception
*/
public function create()
{
......@@ -205,12 +207,12 @@ public function create()
$_classes = array_unique($_classes);
$classesStr = implode($_classes, ' ');
$classesStr = 'class="'. $classesStr .'"';
$classesStr = 'class="' . $classesStr . '"';
return "<div {$classesStr}>{$this->getAttribute('content')}</div>";
}
$Control = $this->_getControl();
$Control = $this->getControl();
if (!$Control) {
throw new QUI\Exception('Control not found. Brick could not be created');
......@@ -245,7 +247,7 @@ public function create()
*
* @return QUI\Control|Bool
*/
protected function _getControl()
protected function getControl()
{
if ($this->_Control) {
return $this->_Control;
......@@ -281,7 +283,7 @@ protected function _getControl()
/**
* Return the brick settings
*
* @return Array
* @return array
*/
public function getSettings()
{
......@@ -291,7 +293,9 @@ public function getSettings()
/**
* Set brick settings
*
* @param Array $settings
* @param array $settings - list of settings
*
* @return void
*/
public function setSettings($settings)
{
......@@ -305,7 +309,7 @@ public function setSettings($settings)
*
* @param String $name - Name of the setting
*
* @return Bool|String
* @return boolean|string
*/
public function getSetting($name)
{
......@@ -319,8 +323,10 @@ public function getSetting($name)
/**
* Set a brick setting
*
* @param String $name - name of the setting
* @param String $value - value of the setting
* @param string $name - name of the setting
* @param string $value - value of the setting
*
* @return void
*/
public function setSetting($name, $value)
{
......@@ -342,7 +348,9 @@ public function getCustomFields()
/**
* Add an exxtra CSS Class to the control
*
* @param String $cssClass
* @param string $cssClass - Name of the CSS Class
*
* @return void
*/
public function addCSSClass($cssClass)
{
......@@ -353,12 +361,14 @@ public function addCSSClass($cssClass)
* Match pattern agains the css classes
*
* @param string $pattern - The shell wildcard pattern.
* @return bool
*
* @return boolean
*/
public function hasCSSClass($pattern)
{
if ($this->getAttribute('classes')
&& fnmatch($pattern, $this->getAttribute('classes'))) {
&& fnmatch($pattern, $this->getAttribute('classes'))
) {
return true;
}
......
......@@ -608,7 +608,7 @@ protected function getBricksXMLFiles()
}
}
QUI\Cache\Manager::set($cache, $result);
return $result;
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren