public function handleModel(Basic $model, $lang = null)
    {
        // Handle links to static items
        $items = $model->getSitemapItems($lang);
        if (is_array($items)) {
            // Foreach static model content
            foreach ($items as $item) {
                /* @var $item Basic|GoogleImage|GoogleAlternateLang|ActiveRecord */
                $this->handleItem($item, $lang);
            }
        }

        // Search models in db
        $query = $model->getSitemapItemsQuery($lang);
        if ($query instanceof \yii\db\Query) {
            // Foreach batch models
            $batchSize = static::getModelBatchSize($model);
            foreach ($query->each($batchSize) as $item) {
                /* @var $item Basic|GoogleImage|GoogleAlternateLang|ActiveRecord */
                $this->handleItem($item, $lang);
            }
        }
    }
public function handleModel(Basic $model, $lang = null)
    {
        // Handle links to static items
        $items = $model->getSitemapItems($lang);
        if (is_array($items)) {
            // Foreach static model content
            foreach ($items as $item) {
                /* @var $item Basic|GoogleImage|GoogleAlternateLang|ActiveRecord */
                $this->handleItem($item, $lang);
            }
        }

        // Search models in db
        $query = $model->getSitemapItemsQuery($lang);
        if ($query instanceof \yii\db\Query) {
            // Foreach batch models
            $batchSize = static::getModelBatchSize($model);
            foreach ($query->each($batchSize) as $item) {
                /* @var $item Basic|GoogleImage|GoogleAlternateLang|ActiveRecord */
                $this->handleItem($item, $lang);
            }
        }
    }
public function handleModel ( Basic $ model , $ lang = null ) { // Handle links to static items $ items = $ model -> getSitemapItems ( $ lang ) ; if ( is_array ( $ items ) ) { // Foreach static model content foreach ( $ items as $ item ) { /* @var $item Basic|GoogleImage|GoogleAlternateLang|ActiveRecord */ $ this -> handleItem ( $ item , $ lang ) ; } } // Search models in db $ query = $ model -> getSitemapItemsQuery ( $ lang ) ; if ( $ query instanceof \ yii \ db \ Query ) { // Foreach batch models $ batchSize = static :: getModelBatchSize ( $ model ) ; foreach ( $ query -> each ( $ batchSize ) as $ item ) { /* @var $item Basic|GoogleImage|GoogleAlternateLang|ActiveRecord */ $ this -> handleItem ( $ item , $ lang ) ; } } }
Handle all model content rows

@param Basic|ActiveRecord $model
@param string|null $lang
Handle all model content rows