Example #1
0
 /**
  * Wrapper for tx_apimacmade::debug() or t3lib_dib::debug() if
  * EXT:api_macmade is not loaded.
  *
  * @param string $header The debug output header.
  * @return string The debug output.
  */
 public function render($header = 'DEBUG')
 {
     ob_start();
     if (class_exists('tx_apimacmade')) {
         tx_apimacmade::debug($this->renderChildren(), $header);
     } else {
         t3lib_div::debug($this->renderChildren(), $header);
     }
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
Example #2
0
 /**
  * Set the configuration.
  *
  * Merge the TS configuration array and the flexform data.
  * 
  * @return void
  */
 protected function _setConfig()
 {
     // Mapping array.
     $flex2conf = array('user' => 'sDEF:user', 'pass' => 'sDEF:pass', 'listPage' => 'sDEF:listPage');
     // Merge them.
     $this->_conf = $this->_api->fe_mergeTSconfFlex($flex2conf, $this->_conf, $this->_piFlexForm);
 }
 /**
  * Populate the given FlexForm configuration with the actions
  * owned by the previously selected controller.
  *
  * @param string $conf The FlexForm configuration to populate.
  * @return void
  * @author Romain Ruetschi <*****@*****.**>
  */
 public static function populateActionItems(array &$conf)
 {
     if (!class_exists('tx_apimacmade')) {
         require_once t3lib_extMgm::extPath('api_macmade') . 'class.tx_apimacmade.php';
     }
     $flexForm = tx_apimacmade::getPhp5Class('flexform', array($conf['row'][$conf['field']]));
     $controller = (string) $flexForm->controller;
     $items = array();
     foreach (t3lib_div::trimExplode(',', self::$controllers[$controller]) as $action) {
         $items[] = array($action, $action, '');
     }
     $conf['items'] = array_merge($conf['items'], $items);
 }