public function addOwners()
    {
        foreach ($this->attributes as $attr) {
            if ($mediafile = $this->loadModel($this->owner->$attr)) {
                $mediafile->addOwner($this->owner->primaryKey, $this->name, $attr);
            }
        }
    }
public function addOwners()
    {
        foreach ($this->attributes as $attr) {
            if ($mediafile = $this->loadModel($this->owner->$attr)) {
                $mediafile->addOwner($this->owner->primaryKey, $this->name, $attr);
            }
        }
    }
public function addOwners ( ) { foreach ( $ this -> attributes as $ attr ) { if ( $ mediafile = $ this -> loadModel ( $ this -> owner -> $ attr ) ) { $ mediafile -> addOwner ( $ this -> owner -> primaryKey , $ this -> name , $ attr ) ; } } }
Add owners to mediafile
Add owners to mediafile