src/Model/Comment.php
public function getOption($key)
    {
        // If possible use the current record
        $record = $this->Parent();

        if (!$record && $this->Parent()) {
            // Otherwise a singleton of that record
            $record = singleton($this->Parent()->dataClass());
        } elseif (!$record) {
            // Otherwise just use the default options
            $record = singleton(CommentsExtension::class);
        }

        return ($record instanceof CommentsExtension || $record->hasExtension(CommentsExtension::class))
            ? $record->getCommentsOption($key)
            : null;
    }
public function getOption($key)
    {
        // If possible use the current record
        $record = $this->Parent();

        if (!$record && $this->Parent()) {
            // Otherwise a singleton of that record
            $record = singleton($this->Parent()->dataClass());
        } elseif (!$record) {
            // Otherwise just use the default options
            $record = singleton(CommentsExtension::class);
        }

        return ($record instanceof CommentsExtension || $record->hasExtension(CommentsExtension::class))
            ? $record->getCommentsOption($key)
            : null;
    }
public function getOption ( $ key ) { // If possible use the current record $ record = $ this -> Parent ( ) ; if ( ! $ record && $ this -> Parent ( ) ) { // Otherwise a singleton of that record $ record = singleton ( $ this -> Parent ( ) -> dataClass ( ) ) ; } elseif ( ! $ record ) { // Otherwise just use the default options $ record = singleton ( CommentsExtension :: class ) ; } return ( $ record instanceof CommentsExtension || $ record -> hasExtension ( CommentsExtension :: class ) ) ? $ record -> getCommentsOption ( $ key ) : null ; }
Get the commenting option

@param string $key

@return mixed Result if the setting is available, or null otherwise
Get the commenting option