Skip to content

Commit

Permalink
using the new Paginator component for baked code
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Aug 13, 2012
1 parent 11aa857 commit 6d1ccbf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@
COMMENT;
echo "\tpublic function {$admin}index() {\n";
echo "\t\t\$this->Paginator->settings(\n";
echo "\t\t\$this->Paginator->settings = array(\n";
echo "\t\t\t'contain' => array(\n";

foreach (array('belongsTo', 'hasAndBelongsToMany', 'hasOne', 'hasMany') as $assoc) {
foreach (array('belongsTo', 'hasOne') as $assoc) {
foreach ($modelObj->{$assoc} as $associationName => $relation) {
echo "\t\t\t\t\${$associationName},\n";
echo "\t\t\t\t'{$associationName}',\n";
}
}

echo "\t\t\t);\n";
echo "\t\t\t)\n";
echo "\t\t);\n\n";
echo "\t\t\$$pluralName = \$this->Paginator->paginate(null, \$this->Filter->filter);\n\n";

Expand Down

0 comments on commit 6d1ccbf

Please sign in to comment.