- changed title to cannot override static methods (Late Static Bindings)
cannot override static methods (Late Static Bindings)
Hi! I wont use this extention for admin theme (based on BS 3).
I need extends for example BSHtml and override some static methods, but it not have effect beacause you always use calls like:
$label = self::icon($icon) . ' ' . $label;
I think it will be useful if you make change to:
$label = static::icon($icon) . ' ' . $label;
Comments (4)
-
reporter -
repo owner plz add a example i think i doesn't understand what do you want to do
-
I have the same problem in BsActiveForm.
For example I want to overide
static private function setLabelOptionsByLayout($layout,$labelOptions=array())
to make some changes to the labels but I can't.
So I had to overide
protected function processRowOptions($model, $attribute, $options) that calls setLabelOptionsByLayout , create an instance version of setLabelOptionsByLayout and call it by
$this->setLayoutLabelOptions($labelOptions);
In my opinion this static function could be written as
protected function setLayoutLabelOptions($labelOptions=array()){ $layout = $this->layout; ..... }
So we could overide it.
-
repo owner - changed status to wontfix
sorry no time for so much changes
- Log in to comment