Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

how to modify toolbar buttons 30 Mar 2012 18:36 #1799

  • rasia
  • rasia's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
In order to get "add", "edit" and "delete" buttons in toolbar you use:
<?php echo JDom::_('html.toolbar', array(
"bar" => $this->lists
));

I want to parse $this->lists and modify it before output.

$this->lists contains:

object(JToolBar)#263 (5) {
["_name:protected"]=> string(7) "toolbar"
["_bar:protected"]=> array(3) {
[0]=> array(5) {
[0]=> string(8) "Standard"
[1]=> string(3) "new"
[2]=> string(23) "GARLICADDS_JTOOLBAR_NEW"
[3]=> string(3) "new"
[4]=> bool(false)
}
[1]=> array(5) {
[0]=> string(8) "Standard"
[1]=> string(4) "edit"
[2]=> string(24) "GARLICADDS_JTOOLBAR_EDIT"
[3]=> string(4) "edit"
[4]=> bool(true)
}
[2]=> array(5) {
[0]=> string(8) "Standard"
[1]=> string(6) "delete"
[2]=> string(26) "GARLICADDS_JTOOLBAR_DELETE"
[3]=> string(6) "delete" [4]=> bool(true)
}
}
["_buttons:protected"]=> array(0) { }
["_buttonPath:protected"]=> array(1) {
[0]=> string(65) "/home/agrodealer/public_html/libraries/joomla/html/toolbar/button"
}
["_errors:protected"]=> array(0) { }
}

How can i access for example array:
[0]=> array(5) {
[0]=> string(8) "Standard"
[1]=> string(3) "new"
[2]=> string(23) "GARLICADDS_JTOOLBAR_NEW"
[3]=> string(3) "new"
[4]=> bool(false)

I tried many ways like: $this->lists->_bar[0] , but i didn't success. Please help me to access all array elements, that object JToolBar contains.

Please Log in or Create an account to join the conversation.

Re: how to modify toolbar buttons 05 Apr 2012 09:03 #1890

  • rasia
  • rasia's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
Anyone can help me reading $this->lists object arrays' elements?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.087 seconds

For starters it's just so easy to design an app in a way that I'm used to i.e. database first then views followed by customization. The fork system is pure brilliance from a developer standpoint as I can override things and still add and update my projects with minimal effort! Truly amazing to be able to build components in Joomla using incremental refinement without having to do everything by hand. Thanks for the great tool! I am so much more productive now than ever and I can't imagine building components any other way!!!!
Dave (Forum)

Get Started