/** * Renders the toolbar. * * @param object A reference to current user. * */ public function renderToolbar() { $toolbar = ''; foreach ($this->toolbar as $button) { $oButton = new w3sButton($this->currentUser); $oButton->fromArray($button); $toolbar .= $oButton->render(); } return sprintf('<tr>%s</tr>', $toolbar); }
public static function renderCommandsFromYml($ymlFile, $currentUser = null) { $renderedCommands = array(); $commands = self::loadScript($ymlFile); foreach ($commands as $command) { $oButton = new w3sButton($currentUser); $oButton->fromArray($command); $renderedCommands[] = $oButton->render(); } return $renderedCommands; }
/** * Draws the button to close the editor. * * @return string The formatted editor * */ protected function renderCloseButton() { $closeButton = new w3sButton(); $closeButton->fromYml('editorButtonClose.yml'); return sprintf('<div class="CloseCurrentEditor">%s</div>', $closeButton->render()); }