本文整理汇总了PHP中Fox::getView方法的典型用法代码示例。如果您正苦于以下问题:PHP Fox::getView方法的具体用法?PHP Fox::getView怎么用?PHP Fox::getView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fox
的用法示例。
在下文中一共展示了Fox::getView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: routKey
/**
* Loades cms page of specified key
*
* @param Fox_Core_Controller_Action $controller
* @param string $key
* @return boolean
*/
public function routKey($controller, $key)
{
$page = Fox::getModel('cms/page');
$page->load($key, 'url_key');
if ($page->getId() && $page->getStatus()) {
if (($container = $page->getLayout()) != '') {
$layoutUpdate = '<container key="' . $container . '"/>';
}
if (($lUpdate = $page->getLayoutUpdate()) != '') {
$layoutUpdate .= $lUpdate;
}
$layout = $controller->loadLayout($layoutUpdate, $key);
$layout->setTitle($page->getTitle());
$layout->setMetaKeywords($page->getMetaKeywords());
$layout->setMetaDescription($page->getMetaDescription());
if ($contentView = $controller->getViewByKey('content')) {
$pageView = Fox::getView('cms/page');
$pageView->setPageContent($page->getContent());
$pageView->setPageTitle($page->getTitle());
$pageView->setPageUrlKey($page->getUrlKey());
$contentView->addChild('__page_content__', $pageView);
}
$controller->renderLayout();
$controller->getResponse()->setHeader('HTTP/1.1', '200 ok');
$controller->getResponse()->setHeader('Status', '200 ok');
$this->routingCompleted = TRUE;
}
return $this->routingCompleted;
}
示例2: ajaxTableAction
/**
* Table data action
*/
public function ajaxTableAction()
{
$view = Fox::getView('admin/system/cache/table');
if ($view) {
$content = $view->renderView();
echo $content;
}
}
示例3: indexAction
/**
* Index action
*/
function indexAction()
{
$this->loadLayout();
$view = Fox::getView('admin/system/module');
if ($view) {
$this->_addContent($view);
}
$view->setHeaderText('Modules');
$this->renderLayout();
}
示例4: editAction
/**
* Edit action
*/
public function editAction()
{
$this->loadLayout();
$view = Fox::getView('extensionmanager/admin/generate/add');
if ($view) {
$this->_addContent($view);
}
$view->setHeaderText('Generate Package');
$this->renderLayout();
}
示例5: getTree
/**
* Get tree view object
*
* @return Fox_Eav_View_Admin_Set_Edit_Tree
*/
public function getTree()
{
if ($tree = $this->getChild(self::FORM_KEY)) {
return $tree;
} else {
$formClass = get_class($this) . '_Tree';
$formView = Fox::getView($formClass);
if ($formView) {
$this->addChild(self::FORM_KEY, $formView);
return $formView;
}
}
}
示例6: exportAction
/**
* Export action
*
* @return void
*/
public function exportAction()
{
$view = Fox::getView('newsletter/admin/subscriber/table');
if ($view) {
$view->setDefaultRecordCount(0);
$content = $view->renderView();
}
$type = $this->getRequest()->getParam('exportType');
if ($type == Fox_Core_View_Admin_Table::EXPORT_TYPE_CSV) {
$view->exportToCSV('subscribers.csv');
} else {
if ($type == Fox_Core_View_Admin_Table::EXPORT_TYPE_XML) {
$view->exportToXML('subscribers.xml');
}
}
return;
}
示例7: changePasswordAction
/**
* Change password page
*/
public function changePasswordAction()
{
if ($id = $this->getRequest()->getParam('id')) {
$model = Fox::getModel('member/member');
$model->load($id);
if ($model->getId()) {
$data['email_id'] = $model->getEmailId();
Fox::getModel('core/session')->setFormData($data);
}
}
$this->loadLayout();
$view = Fox::getView('member/admin/member/password');
if ($view) {
$this->_addContent($view);
}
$view->setHeaderText('Change Member Password');
$this->renderLayout();
}
示例8: _prepareForm
/**
* Prepare form
*
* @param Uni_Core_Form $form
*/
protected function _prepareForm(Uni_Core_Form $form)
{
$form->setName('admin_Role')->setMethod('post');
$subForm1 = new Uni_Core_Form_SubForm();
$subForm1->setLegend('Role Information');
$subForm1->setDescription('General Role Information');
$subForm2 = new Uni_Core_Form_SubForm();
$subForm2->setLegend('Role Resources');
$subForm2->setDescription('Role Resources');
$idField = new Zend_Form_Element_Hidden('id');
$resourceIds = new Zend_Form_Element_Hidden('resource_ids');
$name = new Zend_Form_Element_Text('name', array('size' => '30', 'maxlength' => 200, 'class' => 'required'));
$name->setRequired(true)->setLabel('Role Name')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$access = new Zend_Form_Element_Select('resource_access', array('class' => 'required'));
$access->setRequired(true)->setLabel('Resource Access')->setMultiOptions(Fox::getModel('admin/role')->getRoleAccess());
$subForm1->addElements(array($idField, $name, $resourceIds));
$treeView = Fox::getView('admin/system/role/add/tree');
$subForm2->addElements(array($access));
$subForm2->addSubView($treeView);
$form->addSubForm($subForm1, 'subform1');
$form->addSubForm($subForm2, 'subform2');
parent::_prepareForm($form);
}
示例9: _prepareForm
/**
* Prepare form
*
* @param Uni_Core_Form $form
*/
protected function _prepareForm(Uni_Core_Form $form)
{
$form->setName('generate_package')->setMethod('post');
$form->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
$subForm1 = new Uni_Core_Form_SubForm();
$subForm1->setLegend('General Information');
$subForm1->setDescription('General Information');
$id = new Zend_Form_Element_Hidden('id');
$name = new Zend_Form_Element_Text('name', array('size' => '30', 'maxlength' => 200, 'class' => 'required'));
$name->setRequired(true)->setLabel('Package Name')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$license = new Zend_Form_Element_Text('license', array('size' => '30', 'maxlength' => 200, 'class' => 'required'));
$license->setRequired(true)->setLabel('License')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$licenseUrl = new Zend_Form_Element_Text('license_url', array('size' => '30', 'maxlength' => 200, 'class' => 'url'));
$licenseUrl->setLabel('License Url')->addFilter('StripTags')->addFilter('StringTrim');
$description = new Zend_Form_Element_Textarea('description', array('cols' => '30', 'rows' => '5', 'class' => 'required'));
$description->setRequired(true)->setLabel('Description')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$summary = new Zend_Form_Element_Textarea('summary', array('cols' => '30', 'rows' => '3', 'class' => 'required'));
$summary->setRequired(true)->setLabel('Summary')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$subForm1->addElements(array($id, $name, $description, $summary, $license, $licenseUrl));
$subForm2 = new Uni_Core_Form_SubForm();
$subForm2->setLegend('Release');
$subForm2->setDescription('Release Information');
$version = new Zend_Form_Element_Text('version', array('size' => '30', 'maxlength' => 200, 'class' => 'required'));
$version->setRequired(true)->setLabel('Version')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setDescription("Must be x.x.x.x");
$stability = new Zend_Form_Element_Select('stability', array('class' => 'required'));
$stability->setRequired(true)->setLabel('Stability')->setMultiOptions(Fox::getModel('extensionmanager/package/state')->_getOptionArray());
$releaseNote = new Zend_Form_Element_Textarea('release_note', array('cols' => '30', 'rows' => '5', 'class' => 'required'));
$releaseNote->setRequired(true)->setLabel('Note')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$subForm2->addElements(array($version, $stability, $releaseNote));
$subForm3 = new Uni_Core_Form_SubForm();
$subForm3->setLegend('Contents');
$subForm3->setDescription('Contents');
$contentsView = Fox::getView('extensionmanager/admin/generate/add/contents');
$contentsView->setId("package-contents");
$subForm3->addSubView($contentsView);
/*
$subForm4 = new Uni_Core_Form_SubForm();
$subForm4->setLegend('Dependencies');
$subForm4->setDescription('Dependencies');
$minPhpVersion = new Zend_Form_Element_Text('min_php_version', array('size' => '30', 'maxlength' => 200, 'class' => 'required'));
$minPhpVersion->setRequired(true)
->setLabel('Min Php Version')
->addFilter('StripTags')
->addFilter('StringTrim');
$maxPhpVersion = new Zend_Form_Element_Text('max_php_version', array('size' => '30', 'maxlength' => 200, 'class' => 'required'));
$maxPhpVersion->setRequired(true)
->setLabel('Max Php Version')
->addFilter('StripTags')
->addFilter('StringTrim');
$subForm4->addElements(array($minPhpVersion, $maxPhpVersion));
*/
$subForm5 = new Uni_Core_Form_SubForm();
$subForm5->setLegend('Provider Information');
$subForm5->setDescription('Provider Information');
$providerView = Fox::getView('extensionmanager/admin/generate/add/providers');
$providerView->setId("package-provider");
$subForm5->addSubView($providerView);
$providerNote = new Zend_Form_Element_Textarea('provider_note', array('cols' => '30', 'rows' => '5'));
$providerNote->setLabel('Note')->addFilter('StripTags')->addFilter('StringTrim');
$subForm5->addElements(array($providerNote));
$form->addSubForms(array('general' => $subForm1, 'release' => $subForm2, 'provider' => $subForm5, 'content' => $subForm3));
if ($formData = Fox::getModel('extensionmanager/session')->getFormData()) {
$form->setFormData($formData);
}
parent::_prepareForm($form);
}
示例10: ajaxTableAction
/**
* Table data action
*/
function ajaxTableAction()
{
$view = Fox::getView('eav/admin/attribute/table');
if ($view) {
$content = $view->renderView();
echo $content;
}
}
示例11: _getUpdatedSection
/**
* Get updated section
*
* @return array
*/
protected function _getUpdatedSection()
{
$view = Fox::getView("extensionmanager/admin/packages", "generated-pkgs");
$view->setTemplate("extensionmanager/installed-pkgs");
return array("section" => "installed-packages", "html" => $view->renderView());
}
示例12: _prepareContainer
/**
* Prepare container
*/
protected function _prepareContainer()
{
$contClass = get_class($this);
if (NULL == $this->id) {
$this->id = $contClass;
}
$tableClass = $contClass . '_Table';
$tableView = Fox::getView($tableClass);
if ($tableView) {
$this->addChild('__table__', $tableView);
}
}
示例13: getViewContent
/**
* Instantiate view object of given class
* and renderes html contents
*
*
* @param string $class
* @param string $key
* @param string $tpl
* @param array $options
* @return string
*/
public function getViewContent($class, $key = NULL, $tpl = NULL, array $options = array())
{
$view = Fox::getView($class);
if ($view) {
if ($key) {
$view->setViewKey($key);
}
if ($tpl) {
$view->setTemplate($tpl);
}
if ($options) {
$view->setViewOption($options);
}
return $view->renderView();
}
return '';
}
示例14: ajaxTableAction
/**
* Table date action
*/
public function ajaxTableAction()
{
$this->loadLayout();
$view = Fox::getView('admin/system/role/table');
if ($view) {
$content = $view->renderView();
echo $content;
}
}
示例15: replyAction
/**
* Reply action
*/
public function replyAction()
{
$this->loadLayout();
$id = $this->getRequest()->getParam('id');
$model = Fox::getModel('contact/contact');
$model->load($id);
if ($model->getId()) {
$view = Fox::getView('contact/admin/contact/reply');
if ($view) {
$this->_addContent($view);
}
$view->setHeaderText('Send Reply to "' . $model->getName() . '"');
} else {
$this->sendRedirect('*/*/');
}
$this->renderLayout();
}