Skip to main content
Version: Fegg 4.x

Model::setPrimary

Set Primary ID name

Description​

public self Model::setPrimary( string $id )

Arguments​

NameData typeDefaultRemarks
$idstringPrimary ID name

Example​

Controller
$model = new Model();
$model->setPrimary('news_id');

// Same with the following
$model = new Model(false, array(
'id' => 'news_id',
));