public function getAccessorName(Model $model = null)
    {
        if (is_null($model)) {
            $model = $this->getFromModel();
        }

        if ($this->relatedName) {
            return $this->relatedName;
        }

        $name = strtolower($model->getMeta()->getModelName());

        return ($this->multiple) ? sprintf('%s_set', $name) : $name;
    }
public function getAccessorName(Model $model = null)
    {
        if (is_null($model)) {
            $model = $this->getFromModel();
        }

        if ($this->relatedName) {
            return $this->relatedName;
        }

        $name = strtolower($model->getMeta()->getModelName());

        return ($this->multiple) ? sprintf('%s_set', $name) : $name;
    }
public function getAccessorName ( Model $ model = null ) { if ( is_null ( $ model ) ) { $ model = $ this -> getFromModel ( ) ; } if ( $ this -> relatedName ) { return $ this -> relatedName ; } $ name = strtolower ( $ model -> getMeta ( ) -> getModelName ( ) ) ; return ( $ this -> multiple ) ? sprintf ( '%s_set' , $ name ) : $ name ; }
This method encapsulates the logic that decides what name to give an
accessor descriptor that retrieves
related many-to-one or many-to-many objects. It uses the lower-cased
object_name + "_set",
but this can be overridden with the "related_name" option.

@param Model|null $model

@return string

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
This method encapsulates the logic that decides what name to give an accessor descriptor that retrieves related many - to - one or many - to - many objects . It uses the lower - cased object_name + _set but this can be overridden with the related_name option .