public function hide_if($settingname, $dependenton, $condition = 'notchecked', $value = '1') {
        $this->dependencies[] = new admin_settingdependency($settingname, $dependenton, $condition, $value);

        // Reformat the dependency name to the plugin | name format used in the display.
        $dependenton = str_replace('/', ' | ', $dependenton);

        // Let the setting know, so it can be displayed underneath.
        $findname = str_replace('/', '', $settingname);
        foreach ($this->settings as $name => $setting) {
            if ($name === $findname) {
                $setting->add_dependent_on($dependenton);
            }
        }
    }
public function hide_if($settingname, $dependenton, $condition = 'notchecked', $value = '1') {
        $this->dependencies[] = new admin_settingdependency($settingname, $dependenton, $condition, $value);

        // Reformat the dependency name to the plugin | name format used in the display.
        $dependenton = str_replace('/', ' | ', $dependenton);

        // Let the setting know, so it can be displayed underneath.
        $findname = str_replace('/', '', $settingname);
        foreach ($this->settings as $name => $setting) {
            if ($name === $findname) {
                $setting->add_dependent_on($dependenton);
            }
        }
    }
public function hide_if ( $ settingname , $ dependenton , $ condition = 'notchecked' , $ value = '1' ) { $ this -> dependencies [ ] = new admin_settingdependency ( $ settingname , $ dependenton , $ condition , $ value ) ; // Reformat the dependency name to the plugin | name format used in the display. $ dependenton = str_replace ( '/' , ' | ' , $ dependenton ) ; // Let the setting know, so it can be displayed underneath. $ findname = str_replace ( '/' , '' , $ settingname ) ; foreach ( $ this -> settings as $ name => $ setting ) { if ( $ name === $ findname ) { $ setting -> add_dependent_on ( $ dependenton ) ; } } }
Hide the named setting if the specified condition is matched.

@param string $settingname
@param string $dependenton
@param string $condition
@param string $value
Hide the named setting if the specified condition is matched .