Magento 2

Magento 2: Disable All Modules By Vendor (Regex)

Use this find/replace regex in config.php to set all modules by a particular vendor to disabled.

Find Tab


Replace Tab


PHP Regex Snippet: Convert a Title to a Code

This will take out any non-alphanumeric characters and replace them with an underscore

    protected function convertTitleToCode($title)
        return preg_replace("/[^\w]/i", "_", trim(strtolower($title)));