Example #1
0
 /**
  * Static method to create an iterator object based on the provided array data with
  * optional language context.
  * 
  * @param array $data The filtere results where the iterator object should be created with
  * @param string $langContext The language short code context, if any.
  * @return \cms\menu\QueryIterator
  */
 public static function createArrayIterator(array $data, $langContext)
 {
     return new QueryIteratorFilter(Yii::createObject(['class' => QueryIterator::className(), 'data' => $data, 'lang' => $langContext]));
 }
Example #2
0
 public static function createArrayIterator($data)
 {
     return Yii::createObject(['class' => QueryIterator::className(), 'data' => $data]);
 }