用于非自动提交状态下面的查询提交
@return void
18177
public function commit() {
        $this->connect();
        if (1 == $this->transTimes) {
            $this->pdo->commit();
        }
        --$this->transTimes;
    }
1235264
public function init() {

		parent::init();

		$this->categoryService	= Yii::$app->factory->get( 'categoryService' );

		if( !isset( $this->siteId ) ){

			$this->siteId = Yii::$app->core->siteId;
		}
	}
886548
public function run()
	{
		list($name,$id)=$this->resolveNameID();

		if(isset($this->htmlOptions['id']))
			$id=$this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$id;
		if(isset($this->htmlOptions['name']))
			$name=$this->htmlOptions['name'];

		if($this->flat===false)
		{
			if($this->hasModel())
				echo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);
			else
				echo CHtml::textField($name,$this->value,$this->htmlOptions);
		}
		else
		{
			if($this->hasModel())
			{
				echo CHtml::activeHiddenField($this->model,$this->attribute,$this->htmlOptions);
				$attribute=$this->attribute;
				$this->options['defaultDate']=$this->model->$attribute;
			}
			else
			{
				echo CHtml::hiddenField($name,$this->value,$this->htmlOptions);
				$this->options['defaultDate']=$this->value;
			}

			$this->options['altField']='#'.$id;

			$id=$this->htmlOptions['id']=$id.'_container';
			$this->htmlOptions['name']=$name.'_container';

			echo CHtml::tag('div',$this->htmlOptions,'');
		}

		$options=CJavaScript::encode($this->options);
		$js = "jQuery('#{$id}').datepicker($options);";

		if($this->language!='' && $this->language!='en')
		{
			$this->registerScriptFile($this->i18nScriptFile);
			$js = "jQuery('#{$id}').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['{$this->language}'],{$options}));";
		}

		$cs = Yii::app()->getClientScript();

		if(isset($this->defaultOptions))
		{
			$this->registerScriptFile($this->i18nScriptFile);
			$cs->registerScript(__CLASS__,$this->defaultOptions!==null?'jQuery.datepicker.setDefaults('.CJavaScript::encode($this->defaultOptions).');':'');
		}
		$cs->registerScript(__CLASS__.'#'.$id,$js);
	}
1214174
public function view()
    {
        $this->set('title', $this->title);
        $this->set('buttonText', $this->buttonText);
        $this->set('baseSearchPath', $this->baseSearchPath);
        $this->set('postTo_cID', $this->postTo_cID);

        if ((string) $this->resultsURL !== '') {
            $resultsPage = null;
            $resultsURL = $this->resultsURL;
        } else {
            $resultsPage = $this->postTo_cID ? Page::getById($this->postTo_cID) : null;
            if (is_object($resultsPage) && !$resultsPage->isError()) {
                $resultsURL = $resultsPage->getCollectionPath();
            } else {
                $resultsPage = null;
                $c = Page::getCurrentPage();
                $resultsURL = $c->getCollectionPath();
            }
        }

        $resultsURL = $this->app->make('helper/text')->encodePath($resultsURL);

        $this->set('resultTargetURL', $resultsURL);
        if ($resultsPage !== null) {
            $this->set('resultTarget', $resultsPage);
        } else {
            $this->set('resultTarget', $resultsURL);
        }

        //run query if display results elsewhere not set, or the cID of this page is set
        if ($resultsPage === null && (string) $this->resultsURL === '') {
            if ((string) $this->request->request('query') !== '' || $this->request->request('akID') || $this->request->request('month')) {
                $this->do_search();
            }
        }
    }
740748
public function begin(): void
  {
    $ret = $this->mysqli->autocommit(false);
    if (!$ret) $this->mySqlError('mysqli::autocommit');
  }
564148
public function run() {
		
		$id = $this->htmlOptions['id'];

		echo CHtml::openTag('div', $this->htmlOptions);

		foreach ($this->alerts as $type => $alert) {

			if (is_string($alert)) {
				$type = $alert;
				$alert = array();
			}

			if (isset($alert['visible']) && $alert['visible'] === false) {
				continue;
			}

			/** @var CWebUser $userComponent */
			$userComponent = Yii::app()->getComponent($this->userComponentId);
			if (!$userComponent->hasFlash($type))
				continue;

			$alertText = $userComponent->getFlash($type);
            if (empty($alertText)) { // null, ''
                continue;
            }

			$this->renderSingleAlert($alert, $type, $alertText);
		}

		echo CHtml::closeTag('div');

		$id .= '_' . self::$_containerId++;
		$selector = "#{$id} .alert";

		/** @var CClientScript $cs */
		$cs = Yii::app()->getClientScript();
		$cs->registerScript(__CLASS__ . '#' . $id, "jQuery('{$selector}').alert();");

		foreach ($this->events as $name => $handler) {
			$handler = CJavaScript::encode($handler);
			$cs->registerScript(
				__CLASS__ . '#' . $id . '_' . $name,
				"jQuery('{$selector}').on('{$name}', {$handler});"
			);
		}
	}
648419
public function run()
	{
		if(!empty($this->links)) {
		
			$links=array();
	
			foreach($this->links as $label=>$url) {
				if(is_string($label) || is_array($url))
					$links[] = CHtml::link($this->encodeLabel ? CHtml::encode($label) : $label, $url, array('title'=>$label));
				//else
				//	$links[] = '<span>'.($this->encodeLabel ? CHtml::encode($url) : $url).'</span>';
			}
		}
		
		/*
		if($this->homeLink===null)
			$links[]=CHtml::link(Yii::t('phrase', 'Close'), 'javascript:void(0);', array('title'=>Yii::t('phrase', 'Close'), 'class'=>'closed','off_address'=>''));
		elseif($this->homeLink!==false)
			$links[]=$this->homeLink;
		*/
		
		if(!empty($this->links)) {
			echo implode($this->separator,$links);
			echo ' '.Yii::t('phrase', 'or').' ';
		}
		echo CHtml::link(Yii::t('phrase', 'Close'), 'javascript:void(0);', array('title'=>Yii::t('phrase', 'Close'), 'class'=>'closed','off_address'=>''));
	}
380260
public function aboutAction()
    {
        $this->initHtml();

        $this->html->h3()->sprintf($this->_('About %s'), $this->project->getName());
        $this->html->pInfo(\MUtil_Html_Raw::raw($this->project->getLongDescription($this->locale->getLanguage())));
        $this->html->append($this->_getOrganizationsList());
    }
415222
public function index() {
        $this->paginate = array_merge(array(
            'limit' => 25,
            'contain' => array_keys($this->Model->belongsTo)
        ), $this->Model->admin['paginate']);

        $this->set('results', $this->paginate($this->Model));
    }
1174857
public function index()
    {
        $this->loadModel('Menu.MenuLinks');
        $links = $this->MenuLinks
            ->find('threaded')
            ->where([
                'parent_id IN' => $this->MenuLinks
                    ->find()
                    ->select(['id'])
                    ->where(['url' => '/admin/system/structure'])
            ])
            ->all();

        $this->title(__d('system', 'Site’s Structure'));
        $this->set('links', $links);
        $this->Breadcrumb->push('/admin/system/structure');
    }
1134935
public function next() {
        $this->page->next();
        $this->currentRecord++;

        if ($this->overLimit()) {
            return;
        }

        if (!$this->page->valid()) {
            if ($this->overPageLimit()) {
                return;
            }
            $this->page = $this->page->nextPage();
            $this->currentPage++;
        }
    }
753149
public function run()
	{
		if(($pageCount=$this->getPageCount())<=1)
			return;
		$pages=array();
		for($i=0;$i<$pageCount;++$i)
			$pages[$this->createPageUrl($i)]=$this->generatePageText($i);
		$selection=$this->createPageUrl($this->getCurrentPage());
		echo $this->header;
		echo CHtml::dropDownList($this->getId(),$selection,$pages,$this->htmlOptions);
		echo $this->footer;
	}
751738
public function index()
    {
        $this->Crud->on('beforePaginate', function (Event $event) {
            $query = $this->Users->find('search', $this->request->query);
            $query = $query->select(['id', 'username']);
            $event->subject->query = $query;
        });
        $this->Crud->execute();
    }
755074
public function indexAction()
    {
        if (!$this->canQueueSelectedSite()) {
            $this->view->assign('can_not_proceed', true);
            return;
        }

        $statistics = $this->indexQueue->getStatisticsBySite($this->selectedSite);
        $this->view->assign('indexQueueInitializationSelector', $this->getIndexQueueInitializationSelector());
        $this->view->assign('indexqueue_statistics', $statistics);
        $this->view->assign('indexqueue_errors', $this->indexQueue->getErrorsBySite($this->selectedSite));
    }
39356
public function index()
    {
        $pagination = new Pagination();
        $pattern = StaticFilter::filter(
            'text',
            $this->getController()->request->getQuery('pattern', null)
        );
        $this->view = 'scaffold/index';
        $descriptor =  $this->getDescriptor();

        /** @var Select $query */
        $query = call_user_func_array([$this->getModelName(), 'find'], []);
        $field = $descriptor->getDisplayField();
        $tableName = $descriptor->getDescriptor()->getEntity()->getTableName();
        $query->where(
            [
                "{$tableName}.{$field} LIKE :pattern" => [
                    ':pattern' => "%{$pattern}%"
                ]
            ]
        );
        $pagination->setTotal($query->count());
        $query->limit(
            $pagination->rowsPerPage,
            $pagination->offset
        );
        $records = $query->all();
        $this->set(compact('pagination', 'records', 'pattern', 'descriptor'));
    }
995499
public function actionPagination()
    {
        Yii::$app->session->set($this->MainModel . 'Pagination', Yii::$app->request->queryParams['records']);
        $this->redirect(['index']);
    }
550133
public function init() {
		
		$this->addCssClass($this->htmlOptions, 'panel');
		
		if($this->isValidContext())
			self::addCssClass($this->htmlOptions, 'panel-'.$this->getContextClass());

		if ($this->padContent)
			self::addCssClass($this->contentHtmlOptions, 'panel-body');

		if (!isset($this->contentHtmlOptions['id'])) {
			$this->contentHtmlOptions['id'] = $this->getId();
		}

		if (isset($this->headerHtmlOptions['class'])) {
			$this->headerHtmlOptions['class'] = 'panel-heading ' . $this->headerHtmlOptions['class'];
		} else {
			$this->headerHtmlOptions['class'] = 'panel-heading';
		}

		echo CHtml::openTag('div', $this->htmlOptions);

		$this->renderHeader();
		$this->renderContentBegin();
	}