code: public function setTemplateHints($status)
      {
          $this->deleteTemplateHintsDbConfigs();
  
          $config = $this->getConfig();
          $config->saveConfig('dev/debug/template_hints', (int)$status);
          $config->saveConfig('dev/debug/template_hints_blocks', (int)$status);
      }
docs: Changes status for template and block hints
  
  @param int $status