public function onSavePublished($value, $dc)
    {
        if (null !== $dc->activeRecord && 'folder' === $dc->activeRecord->type) {
            return '1';
        }

        return $value;
    }
public function onSavePublished($value, $dc)
    {
        if (null !== $dc->activeRecord && 'folder' === $dc->activeRecord->type) {
            return '1';
        }

        return $value;
    }
public function onSavePublished ( $ value , $ dc ) { if ( null !== $ dc -> activeRecord && 'folder' === $ dc -> activeRecord -> type ) { return '1' ; } return $ value ; }
A folder page can never be unpublished.

@param string                $value
@param \Contao\DataContainer $dc

@return string
A folder page can never be unpublished .