concrete/src/Block/Block.php
public function getCustomStyle($force = false)
    {
        if ($this->getCustomStyleSetID() > 0 || $force) {
            $csr = StyleSet::getByID($this->getCustomStyleSetID());
            $theme = $this->c->getCollectionThemeObject();
            switch ($this->getBlockTypeHandle()) {
                case BLOCK_HANDLE_LAYOUT_PROXY:
                    $bs = new CoreAreaLayoutCustomStyle($csr, $this, $theme);
                    break;
                default:
                    $bs = new CustomStyle($csr, $this, $theme);
                    break;
            }

            return $bs;
        }
    }
public function getCustomStyle($force = false)
    {
        if ($this->getCustomStyleSetID() > 0 || $force) {
            $csr = StyleSet::getByID($this->getCustomStyleSetID());
            $theme = $this->c->getCollectionThemeObject();
            switch ($this->getBlockTypeHandle()) {
                case BLOCK_HANDLE_LAYOUT_PROXY:
                    $bs = new CoreAreaLayoutCustomStyle($csr, $this, $theme);
                    break;
                default:
                    $bs = new CustomStyle($csr, $this, $theme);
                    break;
            }

            return $bs;
        }
    }
public function getCustomStyle ( $ force = false ) { if ( $ this -> getCustomStyleSetID ( ) > 0 || $ force ) { $ csr = StyleSet :: getByID ( $ this -> getCustomStyleSetID ( ) ) ; $ theme = $ this -> c -> getCollectionThemeObject ( ) ; switch ( $ this -> getBlockTypeHandle ( ) ) { case BLOCK_HANDLE_LAYOUT_PROXY : $ bs = new CoreAreaLayoutCustomStyle ( $ csr , $ this , $ theme ) ; break ; default : $ bs = new CustomStyle ( $ csr , $ this , $ theme ) ; break ; } return $ bs ; } }
Get the custom style object associated to this block.

@param bool $force Do you want a CustomStyle instance even if the block does not have custom styles?

@return \Concrete\Core\Block\CustomStyle|null
Get the custom style object associated to this block .