The Core User Interface helper lets developers programmatically generate certain UI elements like concrete5 dashboard buttons.

Loading the Helper

$ih = Loader::helper(‘concrete/interface’);

# Methods

print $ih->submit($text, $formID, $buttonAlign=’right’, $innerClass=null, $args = array())

Generates a concrete5 button. Uses the $text for text, and will submit the form with the ID $formID when clicked. Common arguments are

Additional Arguments

  • $buttonAlign - aligns the button to “left” or “right”.
  • $innerClass - gives the span element inside a button a specific CSS class.
  • $args - an optional associative array that is appended to the button tag.

print $ih->button($text, $href, $buttonAlign=’right’, $innerClass=null, $args = array())

Generates a simple link button in the concrete5 button style.

print $ih->button_js($text, $onclick, $buttonAlign=’right’, $innerClass=null, $args = array())

Generates a button that activates a JavaScript action. Include “javascript:” in your onclick().

print $ih->buttons($button1, $button2, etc…)

Outputs button text passed as arguments with a special concrete5 wrapper for positioning. Will take 1 to n buttons as arguments.

Recent Discussions on this Topic

No responses have been posted yet.