本文整理汇总了PHP中CrowdfundingHelper::getProjectTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP CrowdfundingHelper::getProjectTitle方法的具体用法?PHP CrowdfundingHelper::getProjectTitle怎么用?PHP CrowdfundingHelper::getProjectTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CrowdfundingHelper
的用法示例。
在下文中一共展示了CrowdfundingHelper::getProjectTitle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Display the view
*/
public function display($tpl = null)
{
$this->option = JFactory::getApplication()->input->get('option');
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->form = $this->get('Form');
$this->params = $this->state->get('params');
// Get rewards images URI.
if (!empty($this->item->id)) {
$userId = CrowdfundingHelper::getUserIdByRewardId($this->item->id);
$uri = JUri::getInstance();
$this->rewardsImagesUri = $uri->toString(array('scheme', 'host')) . '/' . CrowdfundingHelper::getImagesFolderUri($userId);
}
$app = JFactory::getApplication();
/** @var $app JApplicationAdministrator */
// Get project title.
$projectId = $app->getUserState('com_crowdfunding.rewards.pid');
$this->projectTitle = CrowdfundingHelper::getProjectTitle($projectId);
// Get a property that give us ability to upload images.
$this->allowedImages = $this->params->get('rewards_images', 0);
$this->layout = $this->getLayout();
if (strcmp('default', $this->layout) === 0) {
$this->prepareDefaultLayout();
}
// Prepare actions, behaviors, scripts and document.
$this->addToolbar();
$this->setDocument();
parent::display($tpl);
}
示例2: loadFormData
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState($this->option . '.edit.report.data', array());
if (empty($data)) {
$data = $this->getItem();
$data->title = CrowdfundingHelper::getProjectTitle($data->project_id);
}
return $data;
}
示例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');
$currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->state->params->get('project_currency'));
$this->amount = new Crowdfunding\Amount($this->params);
$this->amount->setCurrency($currency);
$projectId = $this->state->get('project_id');
$this->projectTitle = CrowdfundingHelper::getProjectTitle($projectId);
// Prepare sorting data
$this->prepareSorting();
// Prepare actions
$this->addToolbar();
$this->addSidebar();
$this->setDocument();
parent::display($tpl);
}
示例4: display
public function display($tpl = null)
{
$this->option = JFactory::getApplication()->input->get('option');
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// Get parameters of com_crowdfunding.
$this->cfParams = JComponentHelper::getParams('com_crowdfunding');
// Get currencies
$currencyCodes = array();
foreach ($this->items as $item) {
$currencyCodes[] = $item->txn_currency;
$currencyCodes = array_unique($currencyCodes);
}
if (count($currencyCodes) > 0) {
$this->currencies = new Crowdfunding\Currencies(JFactory::getDbo());
$this->currencies->load(array('codes' => $currencyCodes));
$this->money = $this->getMoneyFormatter($this->cfParams);
}
// Get project title.
$search = $this->state->get('filter.search');
if (JString::strlen($search) > 0 and strpos($search, 'pid') === 0) {
$projectId = (int) substr($search, 4);
$this->projectTitle = CrowdfundingHelper::getProjectTitle($projectId);
}
// Get enabled specific plugins.
$extensions = new Prism\Extensions(JFactory::getDbo(), $this->specificPlugins);
$this->enabledSpecificPlugins = $extensions->getEnabled();
// Prepare sorting data
$this->prepareSorting();
// Prepare actions
$this->addToolbar();
$this->addSidebar();
$this->setDocument();
// Include HTML helper
JLoader::register('JHtmlString', JPATH_LIBRARIES . '/joomla/html/html/string.php');
parent::display($tpl);
}
示例5: display
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// Get parameters of com_crowdfunding.
$this->cfParams = JComponentHelper::getParams("com_crowdfunding");
// Get currencies
foreach ($this->items as $item) {
$currencies[] = $item->txn_currency;
$currencies = array_unique($currencies);
}
if (!empty($currencies)) {
$this->currencies = new Crowdfunding\Currencies(JFactory::getDbo());
$this->currencies->load(array("codes" => $currencies));
$this->amount = new Crowdfunding\Amount($this->cfParams);
}
// Get project title.
$search = $this->state->get("filter.search");
if (!empty($search) and 0 === strpos($search, "pid")) {
$projectId = (int) substr($search, 4);
$this->projectTitle = CrowdfundingHelper::getProjectTitle($projectId);
}
// Get enabled specific plugins.
$extensions = new Prism\Extensions(JFactory::getDbo(), $this->specificPlugins);
$this->enabledSpecificPlugins = $extensions->getEnabled();
// Add submenu
CrowdfundingFinanceHelper::addSubmenu($this->getName());
// Prepare sorting data
$this->prepareSorting();
// Prepare actions
$this->addToolbar();
$this->addSidebar();
$this->setDocument();
// Include HTML helper
JLoader::register('JHtmlString', JPATH_LIBRARIES . '/joomla/html/html/string.php');
parent::display($tpl);
}