本文整理匯總了PHP中FabrikHelperHTML::emailIcon方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::emailIcon方法的具體用法?PHP FabrikHelperHTML::emailIcon怎麽用?PHP FabrikHelperHTML::emailIcon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FabrikHelperHTML
的用法示例。
在下文中一共展示了FabrikHelperHTML::emailIcon方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _addButtons
/**
* Add buttons to the view e.g. print, pdf
*
* @return void
*/
protected function _addButtons()
{
$input = $this->app->input;
if ($input->get('format') === 'pdf') {
// If we're rendering as PDF, no point showing any buttons
$this->showEmail = false;
$this->showPrint = false;
$this->showPDF = false;
return;
}
$fbConfig = JComponentHelper::getParams('com_fabrik');
/** @var FabrikFEModelForm $model */
$model = $this->getModel();
$params = $model->getParams();
$this->showEmail = $params->get('email', $fbConfig->get('form_email', 0));
$this->emailLink = '';
$this->printLink = '';
$this->pdfLink = '';
$this->pdfURL = '';
$this->emailURL = '';
$this->printURL = '';
$this->showPrint = $params->get('print', $fbConfig->get('form_print', 0));
if ($this->showPrint) {
$text = FabrikHelperHTML::image('print.png');
$this->printLink = '<a href="#" class="btn btn-default" class="printlink" onclick="window.print();return false;">' . $text . '</a>';
}
if ($input->get('tmpl') != 'component') {
if ($this->showEmail) {
$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);
$this->emailURL = FabrikHelperHTML::emailURL($model);
}
if ($this->showPrint) {
$this->printLink = FabrikHelperHTML::printIcon($model, $params);
$this->printURL = FabrikHelperHTML::printURL($model);
}
}
$this->showPDF = $params->get('pdf', $fbConfig->get('form_pdf', false));
if ($this->showPDF) {
FabrikWorker::canPdf();
if ($this->app->isAdmin()) {
$this->pdfURL = 'index.php?option=com_' . $this->package . '&task=details.view&format=pdf&formid=' . $model->getId() . '&rowid=' . $model->getRowId();
} else {
$this->pdfURL = 'index.php?option=com_' . $this->package . '&view=details&formid=' . $model->getId() . '&rowid=' . $model->getRowId() . '&format=pdf';
}
$this->pdfURL = JRoute::_($this->pdfURL);
$layout = FabrikHelperHTML::getLayout('form.fabrik-pdf-icon');
$pdfDisplayData = new stdClass();
$pdfDisplayData->pdfURL = $this->pdfURL;
$pdfDisplayData->tmpl = $this->tmpl;
$this->pdfLink = $layout->render($pdfDisplayData);
}
}
示例2: _addButtons
/**
* Add buttons to the view e.g. print, pdf
*
* @return void
*/
protected function _addButtons()
{
$app = JFactory::getApplication();
if ($app->input->get('format') === 'pdf') {
// If we're rendering as PDF, no point showing any buttons
$this->showEmail = false;
$this->showPrint = false;
$this->showPDF = false;
return;
}
$fbConfig = JComponentHelper::getParams('com_fabrik');
$package = $app->getUserState('com_fabrik.package', 'fabrik');
$input = $app->input;
$model = $this->getModel();
$params = $model->getParams();
$this->showEmail = $params->get('email', $fbConfig->get('form_email', 0));
$this->emailLink = '';
$this->printLink = '';
$this->pdfLink = '';
$this->pdfURL = '';
$this->emailURL = '';
$this->printURL = '';
$this->showPrint = $params->get('print', $fbConfig->get('form_print', 0));
if ($this->showPrint) {
$text = FabrikHelperHTML::image('print.png');
$this->printLink = '<a href="#" class="printlink" onclick="window.print();return false;">' . $text . '</a>';
}
if ($input->get('tmpl') != 'component') {
if ($this->showEmail) {
$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);
$this->emailURL = FabrikHelperHTML::emailURL($model);
}
if ($this->showPrint) {
$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->getRowId());
$this->printURL = FabrikHelperHTML::printURL($model);
}
}
$this->showPDF = $params->get('pdf', $fbConfig->get('form_pdf', false));
$buttonProperties = array('class' => 'fabrikTip', 'opts' => "{notice:true}", 'title' => '<span>' . FText::_('COM_FABRIK_PDF') . '</span>', 'alt' => FText::_('COM_FABRIK_PDF'));
if ($this->showPDF) {
FabrikWorker::canPdf();
if ($app->isAdmin()) {
$this->pdfURL = 'index.php?option=com_' . $package . '&task=details.view&format=pdf&formid=' . $model->getId() . '&rowid=' . $model->getRowId();
} else {
$this->pdfURL = 'index.php?option=com_' . $package . '&view=details&formid=' . $model->getId() . '&rowid=' . $model->getRowId() . '&format=pdf';
}
$this->pdfURL = JRoute::_($this->pdfURL);
$this->pdfLink = '<a href="' . $this->pdfURL . '">' . FabrikHelperHTML::image('pdf.png', 'list', $this->tmpl, $buttonProperties) . '</a>';
}
}
示例3: _addButtons
/**
* add buttons to the view e.g. print, pdf
*/
protected function _addButtons()
{
$model = $this->getModel();
$params = $model->getParams();
$this->showEmail = $params->get('email', 0);
$this->emailLink = '';
$this->printLink = '';
$this->pdfLink = '';
$this->showPrint = $params->get('print', 0);
if ($this->showPrint) {
$text = JHTML::_('image.site', 'printButton.png', '/images/M_images/', NULL, NULL, JText::_('Print'));
$this->printLink = '<a href="#" onclick="window.print();return false;">' . $text . '</a>';
}
if (JRequest::getVar('tmpl') != 'component') {
if ($this->showEmail) {
$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);
}
if ($this->showPrint) {
$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);
}
$this->showPDF = $params->get('pdf', 0);
if ($this->showPDF) {
$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);
}
} else {
$this->showPDF = false;
}
}
示例4: _addButtons
/**
* Add buttons to the view e.g. print, pdf
*
* @return void
*/
protected function _addButtons()
{
$fbConfig = JComponentHelper::getParams('com_fabrik');
$model = $this->getModel();
$params = $model->getParams();
$this->showEmail = $params->get('email', $fbConfig->get('form_email', 0));
$this->emailLink = '';
$this->printLink = '';
$this->pdfLink = '';
$this->pdfURL = '';
$this->emailURL = '';
$this->printURL = '';
$this->showPrint = $params->get('print', $fbConfig->get('form_print', 0));
if ($this->showPrint) {
$text = JHTML::_('image.site', 'printButton.png', '/images/', null, null, JText::_('Print'));
$this->printLink = '<a href="#" class="printlink" onclick="window.print();return false;">' . $text . '</a>';
}
if (JRequest::getVar('tmpl') != 'component') {
if ($this->showEmail) {
$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);
$this->emailURL = FabrikHelperHTML::emailURL($model);
}
if ($this->showPrint) {
$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);
$this->printURL = FabrikHelperHTML::printURL($model);
}
}
$this->showPDF = $params->get('pdf', $fbConfig->get('form_pdf', false));
$buttonProperties = array('class' => 'fabrikTip', 'opts' => "{notice:true}", 'title' => '<span>' . JText::_('COM_FABRIK_PDF') . '</span>', 'alt' => JText::_('COM_FABRIK_PDF'));
if ($this->showPDF) {
if (!FabrikWorker::canPdf()) {
JError::raiseNotice(500, JText::_('COM_FABRIK_NOTICE_DOMPDF_NOT_FOUND'));
} else {
$this->pdfURL = JRoute::_('index.php?option=com_fabrik&view=details&format=pdf&formid=' . $model->getId() . '&rowid=' . $model->_rowId);
$this->pdfLink = '<a href="' . JRoute::_('index.php?option=com_fabrik&view=details&format=pdf&formid=' . $model->getId()) . '&rowid=' . $this->rowid . '">' . FabrikHelperHTML::image('pdf.png', 'list', $this->tmpl, $buttonProperties) . '</a>';
}
}
}