Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 24th, 2012  |  syntax: PHP  |  size: 0.22 KB  |  views: 58  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Node.php (model)
  2.  
  3. (...)
  4.  
  5. public function find()
  6. {
  7.         parent::find();
  8.  
  9.         if ($this->loaded())
  10.         {
  11.                 // `get_fields()` loads associated fields.
  12.                 $this->custom_fields = $this->get_fields();
  13.         }
  14.  
  15.         return $this;
  16. }