本文整理匯總了PHP中CrowdfundingHelper::addSubmenu方法的典型用法代碼示例。如果您正苦於以下問題:PHP CrowdfundingHelper::addSubmenu方法的具體用法?PHP CrowdfundingHelper::addSubmenu怎麽用?PHP CrowdfundingHelper::addSubmenu使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CrowdfundingHelper
的用法示例。
在下文中一共展示了CrowdfundingHelper::addSubmenu方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: display
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->params = $this->state->get("params");
$currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->state->params->get("project_currency"));
$this->amount = new Crowdfunding\Amount($this->params);
$this->amount->setCurrency($currency);
// Get rewards number
$usersIds = array();
foreach ($this->items as $item) {
$usersIds[] = $item->id;
}
// Get number of rewards.
$statistics = new Crowdfunding\Statistics\Users(JFactory::getDbo(), $usersIds);
$this->projects = $statistics->getProjectsNumber();
$this->amounts = $statistics->getAmounts();
// Add submenu
CrowdfundingHelper::addSubmenu($this->getName());
// Prepare sorting data
$this->prepareSorting();
// Prepare actions
$this->addToolbar();
$this->addSidebar();
$this->setDocument();
parent::display($tpl);
}
示例2: display
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->form = $this->get('Form');
$this->importType = $this->state->get("import.context");
switch ($this->importType) {
case "locations":
$this->legend = JText::_("COM_CROWDFUNDING_IMPORT_LOCATIONS_DATA");
$this->uploadTask = "import.locations";
break;
case "countries":
$this->legend = JText::_("COM_CROWDFUNDING_IMPORT_COUNTRIES_DATA");
$this->uploadTask = "import.countries";
break;
case "states":
$this->legend = JText::_("COM_CROWDFUNDING_IMPORT_STATES_DATA");
$this->uploadTask = "import.states";
break;
default:
// Currencies
$this->legend = JText::_("COM_CROWDFUNDING_IMPORT_CURRENCY_DATA");
$this->uploadTask = "import.currencies";
break;
}
// Add submenu
CrowdfundingHelper::addSubmenu($this->importType);
// Prepare actions
$this->addToolbar();
$this->setDocument();
parent::display($tpl);
}
示例3: display
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->params = $this->state->get("params");
// Get currencies
$currencies = array();
foreach ($this->items as $item) {
$currencies[] = $item->txn_currency;
}
$currencies = array_unique($currencies);
if (!empty($currencies)) {
$options = new Joomla\Registry\Registry();
$options->set("locale_intl", $this->params->get("locale_intl"));
$options->set("amount_format", $this->params->get("amount_format"));
$this->currencies = new Crowdfunding\Currencies(JFactory::getDbo(), $options);
$this->currencies->loadByCode($currencies);
}
$this->amount = new Crowdfunding\Amount($this->params);
// Get enabled specefic plugins.
$extensions = new Prism\Extensions(JFactory::getDbo(), $this->specificPlugins);
$this->enabledSpecificPlugins = $extensions->getEnabled();
// Add submenu
CrowdfundingHelper::addSubmenu($this->getName());
// Prepare sorting data
$this->prepareSorting();
// Prepare actions
$this->addToolbar();
$this->addSidebar();
$this->setDocument();
parent::display($tpl);
}
示例4: addSidebar
/**
* Add a menu on the sidebar of page
*/
protected function addSidebar()
{
// Add submenu
CrowdfundingHelper::addSubmenu($this->getName());
JHtmlSidebar::setAction('index.php?option=' . $this->option . '&view=' . $this->getName());
$this->sidebar = JHtmlSidebar::render();
}
示例5: addSidebar
/**
* Add a menu on the sidebar of page
*/
protected function addSidebar()
{
// Add submenu
CrowdfundingHelper::addSubmenu('projects');
JHtmlSidebar::setAction('index.php?option=' . $this->option . '&view=' . $this->getName());
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('archived' => false)), 'value', 'text', $this->state->get('filter.state'), true));
$this->sidebar = JHtmlSidebar::render();
}
示例6: display
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// Add submenu
CrowdfundingHelper::addSubmenu($this->getName());
// Prepare sorting data
$this->prepareSorting();
// Prepare actions
$this->addToolbar();
$this->addSidebar();
$this->setDocument();
parent::display($tpl);
}
示例7: display
public function display($tpl = null)
{
$this->option = JFactory::getApplication()->input->get('option');
$this->state = $this->get('State');
$this->params = $this->state->get('params');
$this->version = new Crowdfunding\Version();
// Load Prism library version
if (!class_exists('Prism\\Version')) {
$this->prismVersion = JText::_('COM_CROWDFUNDING_PRISM_LIBRARY_DOWNLOAD');
} else {
$prismVersion = new Prism\Version();
$this->prismVersion = $prismVersion->getShortVersion();
if (version_compare($this->prismVersion, $this->version->requiredPrismVersion, '<')) {
$this->prismVersionLowerMessage = JText::_('COM_CROWDFUNDING_PRISM_LIBRARY_LOWER_VERSION');
}
}
// Get popular projects.
$this->popular = new Crowdfunding\Statistics\Projects\Popular(JFactory::getDbo());
$this->popular->load(array('limit' => 5));
// Get popular most funded.
$this->mostFunded = new Crowdfunding\Statistics\Projects\MostFunded(JFactory::getDbo());
$this->mostFunded->load(array('limit' => 5));
// Get latest started.
$options = array('limit' => 10, 'order_by' => 'funding_start', 'order_direction' => 'DESC');
$this->latestStarted = new Crowdfunding\Statistics\Projects\Latest(JFactory::getDbo());
$this->latestStarted->load($options);
// Get latest created.
$options = array('limit' => 10, 'order_by' => 'created', 'order_direction' => 'DESC');
$this->latestCreated = new Crowdfunding\Statistics\Projects\Latest(JFactory::getDbo());
$this->latestCreated->load($options);
// Get currency.
$currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->params->get('project_currency'));
$this->amount = new Crowdfunding\Amount($this->params);
$this->amount->setCurrency($currency);
// Add submenu
CrowdfundingHelper::addSubmenu($this->getName());
$this->addToolbar();
$this->addSidebar();
$this->setDocument();
parent::display($tpl);
}
示例8: addSidebar
/**
* Add a menu on the sidebar of page
*/
protected function addSidebar()
{
CrowdfundingHelper::addSubmenu($this->getName());
JHtmlSidebar::setAction('index.php?option=' . $this->option . '&view=' . $this->getName());
// Prepare options
$approvedOptions = array(JHtml::_('select.option', 1, JText::_('COM_CROWDFUNDING_APPROVED')), JHtml::_('select.option', 0, JText::_('COM_CROWDFUNDING_DISAPPROVED')));
$featuredOptions = array(JHtml::_('select.option', 1, JText::_('COM_CROWDFUNDING_FEATURED')), JHtml::_('select.option', 0, JText::_('COM_CROWDFUNDING_NOT_FEATURED')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('archived' => false)), 'value', 'text', $this->state->get('filter.state'), true));
JHtmlSidebar::addFilter(JText::_('COM_CROWDFUNDING_SELECT_APPROVED_STATUS'), 'filter_approved', JHtml::_('select.options', $approvedOptions, 'value', 'text', $this->state->get('filter.approved'), true));
JHtmlSidebar::addFilter(JText::_('COM_CROWDFUNDING_SELECT_FEATURED_STATUS'), 'filter_featured', JHtml::_('select.options', $featuredOptions, 'value', 'text', $this->state->get('filter.featured'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_crowdfunding'), 'value', 'text', $this->state->get('filter.category_id')));
$filters = Crowdfunding\Filters::getInstance(JFactory::getDbo());
$typesOptions = $filters->getProjectsTypes();
JHtmlSidebar::addFilter(JText::_('COM_CROWDFUNDING_SELECT_TYPE'), 'filter_type_id', JHtml::_('select.options', $typesOptions, 'value', 'text', $this->state->get('filter.type_id')));
$this->sidebar = JHtmlSidebar::render();
}