N98\Magento\Command\AbstractMagentoStoreConfigCommand::detectAskAndSetDeveloperIp PHP Method

detectAskAndSetDeveloperIp() protected method

Determine if a developer restriction is in place, and if we're enabling something that will use it then notify and ask if it needs to be changed from its current value.
protected detectAskAndSetDeveloperIp ( Mage_Core_Model_Store $store, boolean $enabled ) : void
$store Mage_Core_Model_Store
$enabled boolean
return void
    protected function detectAskAndSetDeveloperIp(\Mage_Core_Model_Store $store, $enabled)
    {
        if (!$enabled) {
            // No need to notify about developer IP restrictions if we're disabling template hints etc
            return;
        }
        /** @var OutputInterface $output */
        $output = $this->getHelper('io')->getOutput();
        if (!($devRestriction = $store->getConfig('dev/restrict/allow_ips'))) {
            return;
        }
        $this->askAndSetDeveloperIp($output, $store, $devRestriction);
    }