Yii Framework Forum: CDataProviderIterator and limit - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CDataProviderIterator and limit Rate Topic: -----

#1 User is offline   SiZE 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 68
  • Joined: 01-October 13

Posted 23 January 2015 - 11:21 PM

So, whether it's possible to make it pritty?

$dataProvider = new CActiveDataProvider( $item['model'], array(
	'criteria' => $criteria,
	'pagination' => false
) );

if ( $dataProvider->criteria->limit ) {
	$iterator = $dataProvider->getData();
} else {
	$iterator = new CDataProviderIterator( $dataProvider, self::ROWS_PER_ITERATION );
}


I want to use limit with CDataProviderIterator.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users