concrete/src/Page/Collection/Collection.php
public function getAreaCustomStyle($area, $force = false)
    {
        $areac = $area->getAreaCollectionObject();
        if ($areac instanceof Stack) {
            // this fixes the problem of users applying design to the main area on the page, and then that trickling into any
            // stacks that have been added to other areas of the page.
            return null;
        }
        $result = null;
        $styles = $this->vObj->getCustomAreaStyles();
        $areaHandle = $area->getAreaHandle();
        if ($force || isset($styles[$areaHandle])) {
            $pss = isset($styles[$areaHandle]) ? StyleSet::getByID($styles[$areaHandle]) : null;
            $result = new AreaCustomStyle($pss, $area, $this->getCollectionThemeObject());
        }

        return $result;
    }
public function getAreaCustomStyle($area, $force = false)
    {
        $areac = $area->getAreaCollectionObject();
        if ($areac instanceof Stack) {
            // this fixes the problem of users applying design to the main area on the page, and then that trickling into any
            // stacks that have been added to other areas of the page.
            return null;
        }
        $result = null;
        $styles = $this->vObj->getCustomAreaStyles();
        $areaHandle = $area->getAreaHandle();
        if ($force || isset($styles[$areaHandle])) {
            $pss = isset($styles[$areaHandle]) ? StyleSet::getByID($styles[$areaHandle]) : null;
            $result = new AreaCustomStyle($pss, $area, $this->getCollectionThemeObject());
        }

        return $result;
    }
public function getAreaCustomStyle ( $ area , $ force = false ) { $ areac = $ area -> getAreaCollectionObject ( ) ; if ( $ areac instanceof Stack ) { // this fixes the problem of users applying design to the main area on the page, and then that trickling into any // stacks that have been added to other areas of the page. return null ; } $ result = null ; $ styles = $ this -> vObj -> getCustomAreaStyles ( ) ; $ areaHandle = $ area -> getAreaHandle ( ) ; if ( $ force || isset ( $ styles [ $ areaHandle ] ) ) { $ pss = isset ( $ styles [ $ areaHandle ] ) ? StyleSet :: getByID ( $ styles [ $ areaHandle ] ) : null ; $ result = new AreaCustomStyle ( $ pss , $ area , $ this -> getCollectionThemeObject ( ) ) ; } return $ result ; }
Get the custom style of an area in the currently loaded collection version.

@param \Concrete\Core\Area\Area $area the area for which you want the custom styles
@param bool $force Set to true to retrieve a CustomStyle even if the area does not define any custom style

@return \Concrete\Core\Area\CustomStyle|null return NULL if the area does not have any custom style and $force is false, a CustomStyle instance otherwise
Get the custom style of an area in the currently loaded collection version .