当前位置: 首页>>代码示例>>PHP>>正文


PHP Application::setParam方法代码示例

本文整理汇总了PHP中Application::setParam方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::setParam方法的具体用法?PHP Application::setParam怎么用?PHP Application::setParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application的用法示例。


在下文中一共展示了Application::setParam方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: performHandlerTasks

 public function performHandlerTasks()
 {
     $comment = new Comment();
     $comment->clauseSafe('author_id', Logbook::current()->authorId());
     $comment->clauseSafe('entry_id', Application::param('entry_id'));
     $comment->clauseSafe('comment_id', Application::param('comment_id'));
     $comment->delete();
     Application::setParam('author_id', Logbook::current()->authorId());
     $this->redirectOnSave();
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:10,代码来源:delete_blog_comment.class.php

示例2: editAboutMe

        protected function editAboutMe()
        {
            $form = Form::load('logbook.views.EditBlogAuthorDetails');

            if($form->validate())
            {
                $item = new Author();
                $item->clause('user_id',Application::current()->user()->id());
                $item->parse();
                $item->synch();
                Application::setParam('author_id',$item->id());
                $this->redirectOnSave();
            }
        }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:14,代码来源:edit_blog_author_details.class.php

示例3: savePart

        private function savePart()
        {
            $form = 'frost.views.cms.part.text.TextAdd';
            $part = Part::addMediaToPart($form,'Text');
            
            // Add the 'preview' to the part 
            $part = new Part();
            $part->clauseSafe('part_id',Application::param('part_id')); 
            $part->parse(); 
            $part->save();

            //Part::setParttagsAndSave($part,Application::param('current_tags'));
    
            Application::setParam('module_id',Application::param('module_id'));
            Application::redirect('ModuleDetail');
        }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:16,代码来源:text_add.class.php

示例4: save

        public function save()
	{
	    $form = Form::load('logbook.views.AddBlogComment');
            $capval = Captcha::validate();

	    if($form->validate()&&$capval)
	    {
	        Application::alterParam('comment_content',strip_tags(Application::param('comment_content')));
	        $item = new Comment();
		$item->parse();
                $item->set('comment_date',date('Y-m-d H:M:S'));
                $item->setSafe('author_id',Logbook::current()->authorId());
		$item->save();

                Application::setParam('author_id',Application::param('author_id'));
		Application::setParam('entry_id',Application::param('entry_id'));
		$this->redirectOnSave();
	    }
	}
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:19,代码来源:add_blog_comment.class.php

示例5: doEdit

        protected function doEdit()
	{
	    $form = $this->editForm();

	    if($form->validate())
	    {
            $item = $this->entryToEdit();
            $test = $item->restrict();

	        if(LogbookAccess::currentUserCanEdit($test))
	        {
                $item = $this->entryToEdit();
    		    $item->parse();
    		    $item->synch();
    		    Entry::setTagsAndSave($item,Application::param('entry_tags'));
                Application::setParam('author_id',Application::param('author_id'));
                Application::setParam('entry_id',Application::param('entry_id'));
	        }
                
            LogbookAccess::publishLookupTables();
    		$this->redirectOnSave();
	    }
	}
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:23,代码来源:edit_blog_entry.class.php

示例6: alterParam

 /**
  * Change a parameter that is in the $_POST, $_GET or user parameters array
  *
  * This method first checks post, then get, the user params to see if the value is present.
  * If it was present in any of these, then it changes the value to the new one passed. 
  * If the value could not be found, then it is set using the {@link Application::setParam()}
  * method
  * @param name - the name of the value to change
  * @param new_value - the new value 
  * @access public
  * @static
  */
 function alterParam($name, $new_value)
 {
     $ret = true;
     if (!($param = Application::postVarsParam($name))) {
         if (!($param = Application::getVarsParam($name))) {
             Application::setParam($name, $new_value);
         } else {
             $_GET[$name] = $new_value;
         }
     } else {
         $_POST[$name] = $new_value;
     }
     return $ret;
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:26,代码来源:application.class.php

示例7: redirectOnAccessDenied

 public function redirectOnAccessDenied()
 {
     Application::setParam('author_id', Logbook::current()->authorId());
     Application::setParam('entry_id', Application::param('entry_id'));
     Application::redirect(Application::defaultHandler());
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:6,代码来源:logbook_handler.class.php


注:本文中的Application::setParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。