src/Cms/SectionAwareTrait.php
public function setSection($obj)
    {
        if ($obj instanceof SectionInterface) {
            $this->section = $obj;
        } else {
            $this->createSection();

            $this->section->load($obj);
        }

        return $this;
    }
public function setSection($obj)
    {
        if ($obj instanceof SectionInterface) {
            $this->section = $obj;
        } else {
            $this->createSection();

            $this->section->load($obj);
        }

        return $this;
    }
public function setSection ( $ obj ) { if ( $ obj instanceof SectionInterface ) { $ this -> section = $ obj ; } else { $ this -> createSection ( ) ; $ this -> section -> load ( $ obj ) ; } return $ this ; }
Assign the current section object.

@see Charcoal\Object\RoutableInterface The section object is usually determined by the route.
@param SectionInterface|integer $obj A section object or ID.
@return self
Assign the current section object .