diff --git a/phpxpress/examples/dropdown.php b/phpxpress/examples/dropdown.php index 12215d1..c1a8e66 100644 --- a/phpxpress/examples/dropdown.php +++ b/phpxpress/examples/dropdown.php @@ -9,9 +9,8 @@ $dropdown = new Dropdown; - $dropdown->setTitle("Title"); - $dropdown->setDataSource(array("AA" => "#" , "BB" => "#")); - $dropdown->setSize("large"); + $dropdown->setTitle("Bank Account"); + $dropdown->setDataSource(array("Unicredit" => "#" , "United Bank" => "#" , "National Bank" => "#")); $dropdown->draw(); ?> diff --git a/phpxpress/phpxpress/breadcrumb.php b/phpxpress/phpxpress/breadcrumb.php index fe8cfd3..fb076e2 100644 --- a/phpxpress/phpxpress/breadcrumb.php +++ b/phpxpress/phpxpress/breadcrumb.php @@ -6,7 +6,7 @@ private $locations; - // unless otherwise specified via stating 'setActiveLocation(-1)' + // unless otherwise specified via stating 'setActiveLocation()' // the active location will be the last element private $activeLocation; diff --git a/phpxpress/phpxpress/dropdown.php b/phpxpress/phpxpress/dropdown.php index 032e927..bc7753d 100644 --- a/phpxpress/phpxpress/dropdown.php +++ b/phpxpress/phpxpress/dropdown.php @@ -8,6 +8,7 @@ private $datasource; private $color = 'secondary'; private $size; + private $darkTheme = false; // Associative array name => link public function setDataSource(Array $datasource){ @@ -34,7 +35,13 @@ else throw new InvalidArgumentException('Parameter size must be either default, large or small.'); + } + public function setDarkTheme($bool){ + if(!is_bool($bool)) + throw new InvalidArgumentException('Parameter must be a bool.'); + + $this->darkTheme = $bool; } @@ -52,7 +59,12 @@ echo $this->title; echo ''; - echo '