Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
Bricks
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Modell-Registry
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Modellexperimente
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
Bricks
Commits
2f3e590d
Commit
2f3e590d
erstellt
9 years ago
von
Henning Leutz
Dateien durchsuchen
Optionen
Downloads
Patches
Einfaches Diff
code style
Übergeordneter
4052cc7e
Keine zugehörigen Branchen gefunden
Branches enthält Commit
Keine zugehörigen Tags gefunden
Tags enthält Commit
Keine zugehörigen Merge Requests gefunden
Änderungen
2
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
2 geänderte Dateien
lib/QUI/Bricks/Brick.php
+34
-24
34 Ergänzungen, 24 Löschungen
lib/QUI/Bricks/Brick.php
lib/QUI/Bricks/Manager.php
+1
-1
1 Ergänzung, 1 Löschung
lib/QUI/Bricks/Manager.php
werden angezeigt
mit
35 Ergänzungen
und
25 Löschungen
lib/QUI/Bricks/Brick.php
+
34
−
24
Zeige Datei @
2f3e590d
...
...
@@ -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
A
rray
* @return
a
rray
*/
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
B
ool
|S
tring
* @return
b
ool
ean|s
tring
*/
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
;
}
...
...
Dieser Diff ist reduziert.
Zum Erweitern klicken.
lib/QUI/Bricks/Manager.php
+
1
−
1
Zeige Datei @
2f3e590d
...
...
@@ -608,7 +608,7 @@ protected function getBricksXMLFiles()
}
}
QUI\Cache\Manager
::
set
(
$cache
,
$result
);
return
$result
;
...
...
Dieser Diff ist reduziert.
Zum Erweitern klicken.
Vorschau
0%
Lade
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren