Skip to content
Snippets Groups Projects
Commit f83a3aab authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

WIP: start generic page for component info

parent 961bfff1
No related branches found
No related tags found
No related merge requests found
<?php
$sComponent=(isset($_GET['id']) ? preg_replace('/[^a-z]/', '', $_GET['id']) : '');
echo "DEBUG: sComponent = $sComponent<br>";
$aComponents=[
'infobox'=>[
'label'=>'Infobox',
'description'=>'',
'method'=>'getInfobox',
'examples'=>[
[
'description'=>'Success infobox with progress',
'params'=>[
'type'=>'success',
'bgcolor'=>'',
'icon'=>'far fa-thumbs-up',
'text'=>'Likes',
'number'=>"41,410",
'progressvalue'=>70,
'progresstext'=>'70% Increase in 30 Days'
]
],
]
],
];
if(!isset($aComponents[$sComponent])){
echo '
<h2>Ooops</h2>
<p>Maybe there is a typo ... the component <strong>&quot;'.$sComponent.'&quot;</strong> was not found.</p>
';
} else {
$aComp=$aComponents[$sComponent];
echo $renderAdminLTE->addRow(
'<h2>'.$aComp['label'].'</h2>'
)
.$renderAdminLTE->addRow(
'<h3>Syntax</h3>
<pre>echo $renderAdminLTE-><strong>'.$aComp['method'].'</strong>($aOptions)</pre>
'
);
foreach($aComp['examples'] as $aExample){
echo $renderAdminLTE->addRow(
'<h4>'.$aExample['description'].'</h4>'
)
.$renderAdminLTE->addRow(
showExample('$renderAdminLTE->'.$aComp['method'].'('.var_export($aExample['params'], 1).')')
);
}
;
}
;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment