[[@doctodo method_description:d]].

@param unknown $what
@param unknown $showFrom  (optional)
@param integer $stepsBack [[@doctodo param_description:stepsBack]] [optional]
485269
public static function d($what, $showFrom = true, $stepsBack = 0)
    {
        if (defined('STDIN')) {
            echo CVarDumper::dumpAsString($what, 15, false);
        } else {
            echo '<div class="debug-info group">';
            if ($showFrom) {
                $calledFrom = debug_backtrace();
                if (!defined('ROOT')) {
                    define('ROOT', '');
                }
                echo '<strong>' . substr(str_replace(ROOT, '', $calledFrom[$stepsBack]['file']), 1) . '</strong>';
                echo ' (line <strong>' . $calledFrom[$stepsBack]['line'] . '</strong>)<br />';
            }
            echo VarDumper::dumpAsString($what, 15, true);
            echo '</div>';
        }
    }
615108
public function restore_instance(restore_enrolments_structure_step $step, stdClass $data, $course, $oldid) {
        global $DB;

        if ($instance = $DB->get_record('enrol', array('courseid'=>$course->id, 'enrol'=>$this->get_name()))) {
            $instanceid = $instance->id;
        } else {
            $instanceid = $this->add_instance($course);
        }
        $step->set_mapping('enrol', $oldid, $instanceid);
    }
974238
private function invalidReturnValue(string $what, string $expected, $actual) : \UnexpectedValueException
    {
        $message = 'Invalid return value from %s: expected %s, got %s.';
        $actual  = is_object($actual) ? get_class($actual) : gettype($actual);

        return new \UnexpectedValueException(sprintf($message, $what, $expected, $actual));
    }
1033020
public function goBack($showMessage)
	{
		$blockcenter = new XmlBlockCollection($this->_myWords->Value("MSGERROR"), BlockPosition::Center );
		$this->_document->addXmlnukeObject($blockcenter);

		$paragraph = new XmlParagraphCollection();
		$blockcenter->addXmlnukeObject($paragraph);

		$paragraph->addXmlnukeObject(new XmlnukeText($showMessage,true));

		$anchor = new XmlAnchorCollection("javascript:history.go(-1)");
		$anchor->addXmlnukeObject(new XmlnukeText($this->_myWords->Value("TXT_BACK")));
		$paragraph->addXmlnukeObject($anchor);
	}
1109168
public function showAction()
    {
        $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));

        $model    = $this->getModel();
        // NEAR FUTURE:
        // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');
        $repeater = $model->loadRepeatable();
        $table    = $this->getShowTable();
        $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));
        $table->setRepeater($repeater);
        $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));

        if ($menuItem = $this->findAllowedMenuItem('edit')) {
            $table->tbody()->onclick = array('location.href=\'', $menuItem->toHRefAttribute($this->getRequest()), '\';');
        }

        $tableContainer = \MUtil_Html::create('div', array('class' => 'table-container'), $table);
        $this->html[] = $tableContainer;
    }
897418
public function getShowByName($showName, $isLinkName = false)
  {
    $response = $this->request('/GetShowByName/' . $showName . '/' . $isLinkName);
    if ( $response->response->status == 'false' )
      return null;
    $show = $response->response;

    $show = $this->formatShow($show);

    return $show;
  }
676260
public function step($step = null)
    {
        if (isset($step)) {
            $this->step = $step;
            return $this;
        } else {
            return $this->step;
        }
    }
221702
public function traceFunctionRe($re, $deep = false, $showInternals = false)
    {
        $cb = function (\stdClass $record, $isEntry) use ($re, $deep, $showInternals) {
            static $cnt = 0;

            if (\preg_match($re, $record->function)) {
                $cnt += $isEntry ? 1 : -1;

                return null;
            }

            return ($deep && $cnt && ($showInternals || !$record->isInternal)) ? null : self::SKIP;
        };

        $this->setFilterCallback($cb, self::FILTER_BOTH);
    }
358120
protected function _move(Table $table, $id, $step = 1, $type = self::TYPE_UP)
    {
        $behaviors = $table->behaviors();
        if (!Arr::in('Tree', $behaviors->loaded())) {
            $behaviors->load('Tree');
        }

        $entity = $table->get($id);

        /** @var TreeBehavior $treeBehavior */
        $treeBehavior = $behaviors->get('Tree');
        $treeBehavior->setConfig('scope', $entity->get('id'));

        if ($table->{$type}($entity, $step)) {
            $this->Flash->success($this->_configRead('messages.success'));
        } else {
            $this->Flash->error($this->_configRead('messages.error'));
        }

        return $this->_redirect();
    }
1085392
public function executeStep($stepAction, &$stepActionParams, &$options, array &$context)
    {
        return $this->getConfHelper()->executeStep($stepAction, $stepActionParams, $options, $context);
    }
1139684
private function captureStepEvent(StepTested $event)
    {
        if ($event instanceof AfterStepSetup) {
            $this->stepBeforeTestedEvents[$event->getStep()->getLine()] = $event;
        } else {
            $this->stepAfterTestedEvents[$event->getStep()->getLine()] = $event;
        }
    }
196932
public function takeScreenshotAfterFailedStep(StepEvent $event) {
		if (4 === $event->getResult()) {
			try{
				$this->takeScreenshot($event);
			}catch(\WebDriver\Exception $e){
				$this->logException($e);
			}
		}
	}
922787
public static function show($config, $id = null, $simple = false, $registro = null) {
        //$config = CrudGenerator::translateConfig($config);
        $modelo = strtolower(class_basename($config["modelo"]));
        if ($registro == null) {
            $modeloM = ucfirst($config['modelo']);
            if ($id == null) {
                $registro = $modeloM::first();
            } elseif (is_object($id)) {
                $registro = $id;
                $id = $registro->getKey();
            } else {
                $registro = $modeloM::find($id);
            }
        }
        if (!CrudGenerator::checkPermission($config, $registro->getKey())) {
            return View::make('sirgrimorum::crudgen.error', ['message' => trans('crudgenerator::admin.messages.permission')]);
        }
        if (!$simple) {
            $js_section = config("sirgrimorum.crudgenerator.js_section");
            $css_section = config("sirgrimorum.crudgenerator.css_section");
        } else {
            $js_section = "";
            $css_section = "";
        }
        $view = View::make('sirgrimorum::crudgen.show', array(
                    'config' => $config,
                    'registro' => $registro,
                    'js_section' => $js_section,
                    'css_section' => $css_section,
                    'modelo' => $modelo
        ));
        return $view->render();
    }
703284
public function handleAjaxBeforeStep(StepEvent $event) {
		try{
			$ajaxEnabledSteps = $this->getMainContext()->getAjaxSteps();
			$ajaxEnabledSteps = implode('|', array_filter($ajaxEnabledSteps));

			if (empty($ajaxEnabledSteps) || !preg_match('/(' . $ajaxEnabledSteps . ')/i', $event->getStep()->getText())) {
				return;
			}

			$javascript = <<<JS
if ('undefined' !== typeof window.jQuery && 'undefined' !== typeof window.jQuery.fn.on) {
    window.jQuery(document).on('ajaxStart.ss.test.behaviour', function(){
        window.__ajaxStatus = function() {
            return 'waiting';
        };
    });
    window.jQuery(document).on('ajaxComplete.ss.test.behaviour', function(e, jqXHR){
        if (null === jqXHR.getResponseHeader('X-ControllerURL')) {
            window.__ajaxStatus = function() {
                return 'no ajax';
            };
        }
    });
    window.jQuery(document).on('ajaxSuccess.ss.test.behaviour', function(e, jqXHR){
        if (null === jqXHR.getResponseHeader('X-ControllerURL')) {
            window.__ajaxStatus = function() {
                return 'success';
            };
        }
    });
}
JS;
			$this->getSession()->wait(500); // give browser a chance to process and render response
			$this->getSession()->executeScript($javascript);
		}catch(\WebDriver\Exception $e){
			$this->logException($e);
        }
    }
480767
private function redirectToNextStep($currentStep, $parameters = array())
    {
        $steps = array_keys($this->steps);
        $nextStep = $steps[1 + array_search($currentStep, $steps)];
        Piwik::redirectToModule('Installation', $nextStep, $parameters);
    }
471073
protected function printOutlineExampleResult(TableNode $examples, $iteration, $result, $isSkipped) {
        if (!$this->getParameter('expand')) {
            $color = $this->getResultColorCode($result);
            $this->printColorizedTableRow($examples->getRow($iteration + 1), $color);

            $this->printOutlineExampleResultExceptions($examples, $this->delayedStepEvents);
            $this->writeln('<tr class="' . $color . '">');
            $this->writeln('<td>' . ($iteration + 1) . '</td>');
            $this->writeln('<td colspan="' . count($examples->getRow($iteration)) . '">');
            $this->writeln('<div><a href="#" class="open-screenshots"> [+] Screenshot links </a>&nbsp;<a href="#" class="close-screenshots"> [-] Screenshot links </a></div>');
            $this->writeln('<div class="outline-example-result-screenshots-holder jq-toggle">');
            $this->writeln($this->screenShotMarkup);
            $this->writeln('</div>');
            $this->writeln('</td>');
            $this->writeln('</tr>');
            $this->screenShotMarkup = '';
        } else {
            $this->write('<h4>' . $examples->getKeyword() . ': ');
            foreach ($examples->getRow($iteration + 1) as $value) {
                $this->write('<span>' . $value . '</span>');
            }
            $this->writeln('</h4>');

            foreach ($this->delayedStepEvents as $event) {
                $this->writeln('<ol>');
                $this->printStep(
                    $event->getStep(),
                    $event->getResult(),
                    $event->getDefinition(),
                    $event->getSnippet(),
                    $event->getException()
                );
                $this->writeln('</ol>');
            }
        }
    }
1070540
protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra)
    {
        if (!empty($this->action_function) and is_callable($this->action_function)) {
            call_user_func($this->action_function, $isSent, $to, $cc, $bcc, $subject, $body, $from, $extra);
        }
    }