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

Bricks -> get areas fixes

Übergeordneter f905022b
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -149,11 +149,19 @@ define('package/quiqqer/bricks/bin/Site/Category', [
var Site = this.getAttribute( 'Site' ),
Project = Site.getProject();
QUIAjax.get('package_quiqqer_bricks_ajax_project_getAreas', callback, {
'package' : 'quiqqer/bricks',
project : Project.encode(),
layout : Site.getAttribute( 'layout' )
});
Project.getConfig(function(layout)
{
if ( Site.getAttribute( 'layout' ) ) {
layout = Site.getAttribute( 'layout' );
}
QUIAjax.get('package_quiqqer_bricks_ajax_project_getAreas', callback, {
'package' : 'quiqqer/bricks',
project : Project.encode(),
layout : layout
});
}, 'layout');
},
/**
......
......@@ -19,12 +19,14 @@ class Brick extends QUI\QDOM
{
/**
* Brick settings
*
* @var array
*/
protected $_settings = array();
/**
* Constructor
*
* @param array $params - brick params
*/
public function __construct($params=array())
......@@ -62,7 +64,7 @@ public function __construct($params=array())
}
// control default settings
if ( $Control )
if ( is_object( $Control ) )
{
$controlSettings = $Control->getAttributes();
......@@ -104,6 +106,10 @@ public function __construct($params=array())
*/
public function check()
{
if ( $this->getAttribute( 'type' ) == 'content' ) {
return $this;
}
$Control = $this->_getControl();
if ( !$Control ) {
......@@ -137,12 +143,17 @@ public function create()
/**
* Return the internal control
*
* @return QUI\Control|Bool
*/
protected function _getControl()
{
$Ctrl = $this->getAttribute( 'type' );
if ( $Ctrl === 'content' ) {
return true;
}
if ( !is_callable( $Ctrl ) && !class_exists( $Ctrl ) ) {
return false;
}
......
......@@ -96,9 +96,9 @@ public function getAreasByProject(Project $Project, $layoutType=false)
$projectName = $Project->getName();
if ( !$layoutType ) {
$layoutType = $Project->getAttribute( 'layout' );
}
// if ( !$layoutType ) {
// $layoutType = $Project->getAttribute( 'layout' );
// }
// get all vhosts, and the used templates of the project
$vhosts = QUI::getRewrite()->getVHosts();
......
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