Esempio n. 1
0
 /**
  * Construct
  *
  * @param   object  &$subject  Subject to observer
  * @param   array   $config    Config
  */
 public function __construct(&$subject, $config = array())
 {
     // Include the JLog class.
     jimport('joomla.log.log');
     // Add the logger.
     JLog::addLogger(array('text_file' => 'fabrik.subs.log.php'));
     parent::__construct($subject, $config);
 }
Esempio n. 2
0
 /**
  * Constructor
  *
  * @param   object &$subject The object to observe
  * @param   array  $config   An array that holds the plugin configuration
  */
 public function __construct(&$subject, $config = array())
 {
     parent::__construct($subject, $config);
     $this->oAuth = new FabrikOauth();
 }
Esempio n. 3
0
 /**
  * Convert the posted form data to the data to be shown in the email
  * e.g. radio buttons swap their values for the value's label
  *
  * @return array email data
  */
 public function getEmailData()
 {
     $input = $this->app->input;
     $formModel = $this->getModel();
     $data = parent::getEmailData();
     $id = $input->get('rowid');
     $formId = $formModel->getId();
     $data['fabrik_editurl'] = COM_FABRIK_LIVESITE . JRoute::_("index.php?option=com_" . $this->package . "&view=form&formid=" . $formId . "&rowid=" . $id);
     $data['fabrik_viewurl'] = COM_FABRIK_LIVESITE . JRoute::_("index.php?option=com_" . $this->package . "&view=details&formid=" . $formId . "&rowid=" . $id);
     // $$$ rob fabrik_viewurl/fabrik_editurl described in help text as fabrik_edit_url/fabrik_view_url.
     // $$$ hugh - so let's add edit_link and view_link as well, just for consistency
     $data['fabrik_edit_url'] = $data['fabrik_editurl'];
     $data['fabrik_view_url'] = $data['fabrik_viewurl'];
     $data['fabrik_editlink'] = "<a href=\"{$data['fabrik_editurl']}\">" . FText::_('EDIT') . "</a>";
     $data['fabrik_viewlink'] = "<a href=\"{$data['fabrik_viewurl']}\">" . FText::_('VIEW') . "</a>";
     $data['fabrik_edit_link'] = "<a href=\"{$data['fabrik_editurl']}\">" . FText::_('EDIT') . "</a>";
     $data['fabrik_view_link'] = "<a href=\"{$data['fabrik_viewurl']}\">" . FText::_('VIEW') . "</a>";
     return $data;
 }