Added constructor for class Breadcrumb
authorMarcel Werk <burntime@woltlab.com>
Wed, 12 Oct 2011 18:13:27 +0000 (20:13 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 12 Oct 2011 18:13:27 +0000 (20:13 +0200)
wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php

index 96180792ddde240b2ac3c0d551599bcdd53275aa..20a857b1c6ecdb3e3d6892744e510908eb14fef0 100644 (file)
@@ -25,6 +25,17 @@ class Breadcrumb {
         */
        protected $url = '';
        
+       /**
+        * Creates a new Breadcrumb object.
+        * 
+        * @param       string          $label
+        * @param       string          $url
+        */
+       public function __construct($label = null, $url = null) {
+               if ($label !== null) $this->setLabel($label);
+               if ($url !== null) $this->setURL($url);
+       }
+       
        /**
         * Sets the displayed label.
         *