本文整理汇总了PHP中TemplateRendererFactory类的典型用法代码示例。如果您正苦于以下问题:PHP TemplateRendererFactory类的具体用法?PHP TemplateRendererFactory怎么用?PHP TemplateRendererFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TemplateRendererFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
$this->table = null;
$this->owner = null;
$this->item = null;
$this->mail_notification_builder = new MailNotificationBuilder(new MailBuilder(TemplateRendererFactory::build()));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:NotificationCycle.class.php
示例2: html_get_timezone_popup
function html_get_timezone_popup($selected = 0)
{
$GLOBALS['HTML']->includeFooterJavascriptFile('/scripts/jstimezonedetect/jstz.min.js');
$GLOBALS['HTML']->includeFooterJavascriptFile('/scripts/tuleap/timezone.js');
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/account/');
return $renderer->renderToString('timezone', new Account_TimezoneSelectorPresenter($selected));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:html.php
示例3: __construct
public function __construct(EventManager $event_manager)
{
$this->event_manager = $event_manager;
$this->renderer = TemplateRendererFactory::build()->getRenderer(array(ForgeConfig::get('codendi_dir') . '/src/templates/search'));
$this->search_types = array(Search_SearchTrackerV3::NAME => new Search_SearchTrackerV3(new ArtifactDao()), Search_SearchProject::NAME => new Search_SearchProject(new ProjectDao()), Search_SearchPeople::NAME => new Search_SearchPeople(UserManager::instance()), Search_SearchForum::NAME => new Search_SearchForum(new ForumDao()), Search_SearchSnippet::NAME => new Search_SearchSnippet(new SnippetDao()), Search_SearchWiki::NAME => new Search_SearchWiki(new WikiDao()));
$this->plugin_manager = PluginManager::instance();
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SearchController.class.php
示例4: getContent
/**
* @see AgileDashboard_Pane::getContent()
*/
public function getContent()
{
$columns = $this->config->getDashboardColumns();
$renderer = TemplateRendererFactory::build()->getRenderer(dirname(__FILE__) . '/../templates');
return $renderer->renderToString('agiledashboard-pane', $this->getPresenterUsingMappedFields($columns));
// TODO what if no semantic status and no mapping????
}
开发者ID:nterray,项目名称:tuleap,代码行数:10,代码来源:Pane.class.php
示例5: displayBody
private function displayBody()
{
$items = $this->data_mapper->fetchAll($this->getProjectFromRequest());
$presenter = new ChooseNewsPresenter($items, $this->request->get('project_id'));
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/news/');
$renderer->renderToPage('choose_news', $presenter);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:ChooseNewsItemController.class.php
示例6: send_new_user_email
function send_new_user_email($to, $login, $password, $confirm_hash, $template, $isAdminPresenter)
{
//needed by new_user_email.txt
$base_url = get_server_url();
$defaultTheme = $GLOBALS['sys_themedefault'];
$color_logo = "#0000";
$color_button = "#347DBA";
if (themeIsFlamingParrot($defaultTheme)) {
$defaultThemeVariant = $GLOBALS['sys_default_theme_variant'];
$color_logo = FlamingParrot_Theme::getColorOfCurrentTheme($defaultThemeVariant);
$color_button = $color_logo;
}
$logo_url = $base_url . "/themes/" . $defaultTheme . "/images/organization_logo.png";
$has_logo = file_exists(dirname(__FILE__) . '/../themes/' . $defaultTheme . '/images/organization_logo.png');
if ($isAdminPresenter) {
$subject = $GLOBALS['Language']->getText('account_register', 'welcome_email_title', $GLOBALS['sys_name']);
include $GLOBALS['Language']->getContent('account/new_account_email');
$presenter = new MailRegisterByAdminPresenter($has_logo, $logo_url, $title, $section_one, $section_two, $section_after_login, $thanks, $signature, $help, $color_logo, $login, $section_three, $section_after_password, $password);
} else {
$subject = $GLOBALS['Language']->getText('include_proj_email', 'account_register', $GLOBALS['sys_name']);
include $GLOBALS['Language']->getContent('include/new_user_email');
$redirect_url = $base_url . "/account/verify.php?confirm_hash={$confirm_hash}";
$presenter = new MailRegisterByUserPresenter($has_logo, $logo_url, $title, $section_one, $section_two, $section_after_login, $thanks, $signature, $help, $color_logo, $login, $redirect_url, $redirect_button, $color_button);
}
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/mail/');
$mail = initializeMail($subject, $GLOBALS['sys_noreply'], $to, $renderer->renderToString($template, $presenter), $message);
return $mail->send();
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:28,代码来源:proj_email.php
示例7: __construct
public function __construct(Codendi_Request $request, Tracker_Hierarchy_HierarchicalTracker $tracker, Tracker_Hierarchy_HierarchicalTrackerFactory $factory, Tracker_Hierarchy_Dao $dao)
{
$this->request = $request;
$this->tracker = $tracker;
$this->factory = $factory;
$this->dao = $dao;
$this->renderer = TemplateRendererFactory::build()->getRenderer(dirname(__FILE__) . '/../../../templates');
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:8,代码来源:Controller.class.php
示例8: index
public function index(CSRFSynchronizerToken $csrf, Response $response)
{
$title = $GLOBALS['Language']->getText('plugin_tracker_config', 'title');
$params = array('title' => $title);
$renderer = TemplateRendererFactory::build()->getRenderer(TRACKER_TEMPLATE_DIR);
$response->header($params);
$renderer->renderToPage(self::$TEMPLATE, new TrackerPluginConfigPresenter($csrf, $title, $this->localincfinder->getLocalIncPath(), $this->config));
$response->footer($params);
}
开发者ID:pkdevbox,项目名称:tuleap,代码行数:9,代码来源:TrackerPluginConfigController.php
示例9: site_index
public function site_index(HTTPRequest $request)
{
$this->assertSiteAdmin($request);
$presenter = new MediawikiSiteAdminAllowedProjectsPresenter($this->resource_restrictor->searchAllowedProjects());
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/resource_restrictor');
$GLOBALS['HTML']->header(array('title' => 'Mediawiki', 'selected_top_tab' => 'admin'));
$renderer->renderToPage($presenter::TEMPLATE, $presenter);
$GLOBALS['HTML']->footer(array());
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:MediawikiSiteAdminController.class.php
示例10: getAdminIndex
public function getAdminIndex(HTTPRequest $request)
{
$this->checkAccess($request);
$presenter = new SVN_Admin_AllowedProjectsPresenter($this->token_manager->getProjectsAuthorizingTokens(), true);
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/resource_restrictor');
$GLOBALS['HTML']->header(array('title' => 'SVN', 'selected_top_tab' => 'admin'));
$renderer->renderToPage($presenter::TEMPLATE, $presenter);
$GLOBALS['HTML']->footer(array());
}
开发者ID:ansarbek,项目名称:tuleap,代码行数:9,代码来源:SVN_Admin_Controller.php
示例11: display
public function display(Codendi_Request $request)
{
$title = $GLOBALS['Language']->getText('plugin_git', 'descriptor_name');
$renderer = TemplateRendererFactory::build()->getRenderer(dirname(GIT_BASE_DIR) . '/templates');
$admin_presenter = new Git_AdminGerritPresenter($title, $this->csrf, $this->getListOfGerritServersPresenters());
$GLOBALS['HTML']->header(array('title' => $title, 'selected_top_tab' => 'admin'));
$renderer->renderToPage('admin-plugin', $admin_presenter);
$GLOBALS['HTML']->footer(array());
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:AdminGerritController.class.php
示例12: getAdminIndex
public function getAdminIndex(HTTPRequest $request)
{
$this->checkAccess($request);
$presenter = new PHPWikiAdminAllowedProjectsPresenter($this->wiki_migrator->searchProjectsUsingPlugin());
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/resource_restrictor');
$GLOBALS['HTML']->header(array('title' => 'PHPWiki', 'selected_top_tab' => 'admin'));
$renderer->renderToPage($presenter::TEMPLATE, $presenter);
$GLOBALS['HTML']->footer(array());
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:PHPWikiAdminController.class.php
示例13: __construct
public function __construct(Git_Mirror_MirrorDataMapper $data_mapper, $etc_templates_path)
{
$this->data_mapper = $data_mapper;
$template_dirs = array();
if (is_dir($etc_templates_path)) {
$template_dirs[] = $etc_templates_path . '/' . self::TEMPLATES_PATH;
}
$template_dirs[] = GIT_TEMPLATE_DIR . '/' . self::TEMPLATES_PATH;
$this->template_renderer = TemplateRendererFactory::build()->getRenderer($template_dirs);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:ConfigPermissionsSerializer.class.php
示例14: service_public_areas
public function service_public_areas($params)
{
if ($params['project']->usesService($this->getServiceShortname())) {
$service = $params['project']->getService($this->getServiceShortname());
$wiki = new PHPWiki($params['project']->getID());
$presenter = new WidgetPublicAreaPresenter($service->getUrl(), $GLOBALS['HTML']->getImagePath('ic/wiki.png'), $this->text, $wiki->getProjectPageCount());
$renderer = TemplateRendererFactory::build()->getRenderer(PHPWIKI_TEMPLATE_DIR);
$params['areas'][] = $renderer->renderToString('widget_public_area', $presenter);
}
}
开发者ID:ranjanasim,项目名称:tuleap,代码行数:10,代码来源:phpwikiPlugin.class.php
示例15: send_approval_new_user_email
function send_approval_new_user_email($to, $login)
{
//needed by new_user_email.txt
$base_url = get_server_url();
$presenter = new MailPresenterFactory();
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/mail/');
$mail = new TuleapRegisterMail($presenter, $renderer, "mail-admin-approval");
$mail = $mail->getMail($login, '', '', $base_url, $GLOBALS['sys_noreply'], $to, "admin-approval");
return $mail->send();
}
开发者ID:rinodung,项目名称:tuleap,代码行数:10,代码来源:proj_email.php
示例16: index
public function index()
{
$title = $GLOBALS['Language']->getText('admin_main', 'configure_access_controls');
$params = array('title' => $title);
$renderer = TemplateRendererFactory::build()->getRenderer($this->getTemplateDir());
$this->response->includeFooterJavascriptFile('/scripts/tuleap/admin-access-mode.js');
$this->response->header($params);
$renderer->renderToPage(self::TEMPLATE, new ForgeAccess_AdminPresenter($this->csrf, $title, $this->localincfinder->getLocalIncPath(), ForgeConfig::get(ForgeAccess::CONFIG), count($this->user_dao->searchByStatus(PFUser::STATUS_RESTRICTED)), ForgeConfig::get(User_ForgeUGroup::CONFIG_AUTHENTICATED_LABEL), ForgeConfig::get(User_ForgeUGroup::CONFIG_REGISTERED_LABEL), ForgeConfig::get(ForgeAccess::PROJECT_ADMIN_CAN_CHOOSE_VISIBILITY), ForgeConfig::get(ForgeAccess::REVERSE_PROXY_REGEXP)));
$this->response->footer($params);
}
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:10,代码来源:AdminController.php
示例17: __construct
/**
* @param Renderer The renderer wich contains the chart
* @param int The id of the chart
* @param int The rank of the chart
* @param string The title of the chart
* @param string The description of the chart
* @param int The width of the chart
* @param int The height of the chart
*/
public function __construct($renderer, $id, $rank, $title, $description, $width, $height)
{
$this->renderer = $renderer;
$this->id = $id;
$this->rank = $rank;
$this->title = $title;
$this->description = $description;
$this->width = $width;
$this->height = $height;
$this->mustache_renderer = TemplateRendererFactory::build()->getRenderer(GRAPH_ON_TRACKER_V5_TEMPLATE_DIR);
}
开发者ID:rinodung,项目名称:tuleap,代码行数:20,代码来源:GraphOnTrackersV5_Chart.class.php
示例18: index
public function index()
{
$title = $GLOBALS['Language']->getText('admin_main', 'configure_homepage');
$params = array('title' => $title);
$renderer = TemplateRendererFactory::build()->getRenderer($this->getTemplateDir());
$headlines = $this->getHeadlines();
$this->response->includeFooterJavascriptFile('/scripts/tuleap/admin-homepage.js');
$this->response->header($params);
$renderer->renderToPage(self::TEMPLATE, new Admin_Homepage_Presenter($this->csrf, $title, $this->dao->isStandardHomepageUsed(), $headlines));
$this->response->footer($params);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:Controller.php
示例19: __construct
public function __construct(Codendi_Request $request)
{
$this->request = $request;
$this->renderer = TemplateRendererFactory::build()->getRenderer($this->getTemplatesDir());
$permissions_dao = new User_ForgeUserGroupPermissionsDao();
$this->user_group_permissions_factory = new User_ForgeUserGroupPermissionsFactory($permissions_dao);
$this->user_group_permissions_manager = new User_ForgeUserGroupPermissionsManager($permissions_dao);
$user_group_dao = new UserGroupDao();
$this->user_group_factory = new User_ForgeUserGroupFactory($user_group_dao);
$this->user_group_manager = new User_ForgeUserGroupManager($user_group_dao);
$user_group_users_dao = new User_ForgeUserGroupUsersDao();
$this->user_group_users_factory = new User_ForgeUserGroupUsersFactory($user_group_users_dao);
$this->user_group_users_manager = new User_ForgeUserGroupUsersManager($user_group_users_dao);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:PermissionDelegationController.php
示例20: process
public function process(TrackerManager $engine, Codendi_Request $request, PFUser $current_user)
{
$workflow_factory = WorkflowFactory::instance();
if ($request->get('func') == Workflow::FUNC_ADMIN_RULES) {
$token = new CSRFSynchronizerToken(TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => Workflow::FUNC_ADMIN_RULES)));
$rule_date_factory = new Tracker_Rule_Date_Factory(new Tracker_Rule_Date_Dao(), Tracker_FormElementFactory::instance());
$action = new Tracker_Workflow_Action_Rules_EditRules($this->tracker, $rule_date_factory, $token);
} elseif ($request->get('func') == Workflow::FUNC_ADMIN_CROSS_TRACKER_TRIGGERS) {
$token = new CSRFSynchronizerToken(TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => Workflow::FUNC_ADMIN_CROSS_TRACKER_TRIGGERS)));
$renderer = TemplateRendererFactory::build()->getRenderer(TRACKER_BASE_DIR . '/../templates');
$action = new Tracker_Workflow_Action_Triggers_EditTriggers($this->tracker, $token, $renderer, $workflow_factory->getTriggerRulesManager());
} else {
if ($request->get('func') == Workflow::FUNC_ADMIN_GET_TRIGGERS_RULES_BUILDER_DATA) {
$action = new Tracker_Workflow_Action_Triggers_GetTriggersRulesBuilderData($this->tracker, Tracker_FormElementFactory::instance());
} else {
if ($request->get('func') == Workflow::FUNC_ADMIN_ADD_TRIGGER) {
$action = new Tracker_Workflow_Action_Triggers_AddTrigger($this->tracker, Tracker_FormElementFactory::instance(), $workflow_factory->getTriggerRulesManager());
} else {
if ($request->get('func') == Workflow::FUNC_ADMIN_DELETE_TRIGGER) {
$action = new Tracker_Workflow_Action_Triggers_DeleteTrigger($this->tracker, $workflow_factory->getTriggerRulesManager());
} else {
if ($request->get('create')) {
$action = new Tracker_Workflow_Action_Transitions_Create($this->tracker, $workflow_factory);
} else {
if ($request->get('edit_transition')) {
$action = new Tracker_Workflow_Action_Transitions_EditTransition($this->tracker, TransitionFactory::instance(), new Transition_PostActionFactory());
} else {
if ($request->get('delete')) {
$action = new Tracker_Workflow_Action_Transitions_Delete($this->tracker, $workflow_factory);
} else {
if ($request->get('transitions')) {
$action = new Tracker_Workflow_Action_Transitions_CreateMatrix($this->tracker, $workflow_factory, Tracker_FormElementFactory::instance());
} else {
if ($request->get('workflow_details')) {
$action = new Tracker_Workflow_Action_Transitions_Details($this->tracker, TransitionFactory::instance());
} else {
$action = new Tracker_Workflow_Action_Transitions_DefineWorkflow($this->tracker, WorkflowFactory::instance(), Tracker_FormElementFactory::instance());
}
}
}
}
}
}
}
}
}
$action->process($engine, $request, $current_user);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:48,代码来源:WorkflowManager.class.php
注:本文中的TemplateRendererFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论