本文整理匯總了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);
}