Activates a list of models
@return mixed
180401
public function actionAssignTags()
    {
        foreach(explode(',',$_POST['Contact']['tags']) as $tag_value) {
            $tag = Tag::find()->where('status<>"deleted" AND name=:name AND type=:type', [':name' => $tag_value, ':type' => 'Contact'])->one();
            if(!isset($tag->id)) {
                $tag = new Tag;
                $tag->type = 'Contact';
                $tag->name = $tag_value;
                $tag->save();       
            }
            $tagList[] = $tag->id;
        }

        $this->getSearchCriteria();
        $this->dataProvider->pagination = false;

        $result = $this->dataProvider->query->select('id')->asArray()->all();

        foreach($result as $model) {
            foreach ($tagList as $tag_id) {
                $insert[] = '(' . $tag_id . ',' . $model['id'] . ',NOW(),NOW(),' . Yii::$app->user->identity->id . ',' . Yii::$app->user->identity->id . ')';
            }
        }
        // INSERT multiple rows at once
        \Yii::$app->db->createCommand("INSERT IGNORE INTO Contact_Tag (Tag_id, Contact_id, update_time, create_time, update_by, create_by) VALUES ".implode(',',$insert))->execute();
        return $this->redirect(['index']);
    }
632989
public function actionIndex()
    {
        if ($this->modelSearchClass !== null) {
            /* @var $modelClass ActiveRecord */
            $modelSearch = new $this->modelSearchClass;
            $dataProvider = $modelSearch->search(Yii::$app->getRequest()->getQueryParams());
        } else {
            /* @var $modelClass ActiveRecord */
            $modelClass = $this->modelClass;
            $query = $modelClass::find();
            $dataProvider = new ActiveDataProvider([
                'query' => $query,
            ]);
        }

        $this->fire('query', [$dataProvider]);
        return $dataProvider;
    }
1018918
public function listModels($optParams = array()) {
      $data = $this->__call('list', array($optParams));

      if ($this->useObjects()) {
        return new ListModel($data);
      } else {
        return $data;
      }
    }
557580
public function listAction()
    {
        $automaticTheme = $this->addAutomaticTheme();

        $themeMaper = $this->getAdminThemeService();

        $themesActivated = $themeMaper->findActiveTheme();
        $themesNotActivated = $themeMaper->findActiveTheme(false);

        return array('themesActivated'    => $themesActivated,
                     'themesNotActivated' => $themesNotActivated,
                     'automaticTheme'     => $automaticTheme,
                     'flashMessages'      => $this->flashMessenger()->getMessages());
    }
132181
protected function registerActivations()
    {
        $this->app->singleton('sentinel.activations', function ($app) {
            $config = $app['config']->get('cartalyst.sentinel.activations');

            return new IlluminateActivationRepository($config['model'], $config['expires']);
        });
    }
571299
public function actionList()
    {
        $searchModel = new SearchFavoriteProduct();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('list', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
994750
private function getActiveModel()
    {
        $input = $this->getEnvironment()->getInputProvider();
        if (false === $input->hasParameter('id')) {
            return null;
        }

        $modelId      = ModelId::fromSerialized($input->getParameter('id'));
        $dataProvider = $this->getEnvironment()->getDataProvider($modelId->getDataProviderName());

        $model = $dataProvider->fetch($dataProvider->getEmptyConfig()->setId($modelId->getId()));

        return $model;
    }
5434
protected function registerEloquentModels()
    {
        $files = $this->app['files']->files(storage_path('framework/entities'));
        
        foreach ($files as $file) {
            if ($this->app['files']->extension($file) == '') {
                require_once $file;
            }
        }
    }
1244320
public function activate()
    {
        DB::beginTransaction();

        try {
            $this->activation->activateUser(
                request()->input('token')
            );
        } catch ( \Exception $e ) {
            DB::rollback();

            return redirect()->back()->withErrors($e->getMessage());
        }

        DB::commit();

        return redirect()->intended();
    }
249076
protected static function getModelTypes()
    {
        $class = get_called_class();

        if($class::$useType === false) {
            return array();
        }

        $class_name = $class::getClassName(false);
        $parent = get_parent_class($class);
        if ($parent) {
            $names_parent = $parent::getModelTypes();
            $names = array_merge($names_parent, array($class_name));
        } else {
            $names = array();
        }

        return $names;

    }
602732
public function active()
    {
        $classes = $this->getAdaptee()->classes;

        foreach ($classes as $class) {
            if (strpos($class, 'current') !== false) {
                return true;
            }
        }

        return false;
    }
284206
public function getList()
    {
        if ($this->kind === 'collection') {
            $model_class = $this->model_class;
            return $model_class::dump($this->where, $model_class::PRIMARY_KEY);
        }
        return [$this->where];
    }
461337
public function activate() {
		foreach ( $this->modules as $module ) {
			$module->activation_hook();
		}

		register_uninstall_hook( CPTP_PLUGIN_FILE, array( __CLASS__, 'uninstall' ) );
	}
883747
public function activate()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/activate/');
        $this->deserialize($data);
    }
56486
public function forms()
    {
        $response = static::query($this->client, [$this->fillable_form_id, self::FORMS_URI]);

        $forms = new ModelsList();

        if (isset($response['items'])) {
            foreach ($response['items'] as $item) {
                $forms[] = new FilledForm($this->client, $this->fillable_form_id, $item);
            }
        }
        return $forms;
    }
57754
public function actionRefresh(): array
    {
        $model = Yii::createObject($this->modelClass);
        $model->invalidate();

        return $model->getAvailableAndAssignedRoutes();
    }
105796
private function registerModelsBindings()
    {
        foreach (Support\BindingManager::getModelsBindings() as $key => $contract) {
            $this->bind($contract, $this->config()->get("laravel-tracker.models.$key"));
        }
    }