PHP code example of devgroup / yii2-data-structure-tools

1. Go to this page and download the library: Download devgroup/yii2-data-structure-tools library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

devgroup / yii2-data-structure-tools example snippets


php composer.phar 

public function actionFilter()
{
  /** @var AbstractSearch $component */
  $search = \Yii::$app->getModule('properties')->getSearch();
  $config = ['storage' => [
      EAV::class,
      StaticValues::class,
    ]
  ];
  $modelIds = $search->filterByProperties(Page::class, $config, \Yii::$app->request->get('filter'));
  $dataProvider = new ActiveDataProvider([
      //provider config
  ]);
  //other stuff here
}