Registry / orm / yii2tech-ar-position

yii2tech-ar-position

JSON →
library1.0.1phppackagistunverified

Provides support for ActiveRecord custom sort in Yii2, enabling manual ordering of records.

composer require yii2tech/ar-position
INSTALL
IMPORT
SIG · YII2TECH-AR-POSITI
Y
yii2tech-ar-position
ormphpv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PositionBehavior
use yii2tech\ar\position\PositionBehavior;

Attach the PositionBehavior to an ActiveRecord model and move it to the first position.

use yii2tech\ar\position\PositionBehavior; $model = new Item(); $model->attachBehavior('position', [ 'class' => PositionBehavior::class, 'positionAttribute' => 'sort_order', ]); $model->moveFirst();
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
yii2tech-ar-position — pip install yii2tech-ar-position · libregistry