RitaSessionHelper::afterRender()

@param mixed $filename
@return void
165260
public function afterRender($filename) {
		$msgs = CakeSession::read('Alerts');
		
		if(empty($msgs)){
			return;
		}
		$out = array();
		$out[]= '<script type="text/javascript">';
		foreach($msgs as $msg){

			$out[] = sprintf('Rita.Alert.%s("%s");',$msg['type'],$msg['msg']);
		}
		$out[]= '</script>';
		$out = implode(' ',$out);
		
		$this->getView()->append('content',$out);
		CakeSession::write('Alerts',array());
	}
557306
private function printHeaderOnAfterExampleEvent(Formatter $formatter, Event $event, $eventName)
    {
        if (!$event instanceof AfterScenarioTested || ExampleTested::AFTER !== $eventName) {
            return;
        }

        if ($this->headerPrinted) {
            return;
        }

        $feature = $event->getFeature();
        $stepTestResults = $this->getStepTestResults();

        $this->tablePrinter->printHeader($formatter, $feature, $this->outline, $stepTestResults);
        $this->headerPrinted = true;
    }
922107
public function render($filename, array $data = [])
    {
        $filename = $this->checkParseFile($filename, false);

        return $this->template->render($filename, $data);
    }
1073724
public function afterStep($scope)
    {
        // if test is passed, skip taking screenshot
        if ($scope->getTestResult()->isPassed()) {
            return;
        }

        // create filename string
        $featureFolder = preg_replace('/\W/', '', $scope->getFeature()->getTitle());

        $scenarioName = $this->currentScenario->getTitle();
        $fileName = preg_replace('/\W/', '', $scenarioName).'.png';

        // create screenshots directory if it doesn't exist
        if (!file_exists($this->screenshotDir.'/'.$featureFolder)) {
            mkdir($this->screenshotDir.'/'.$featureFolder);
        }

        $this->saveScreenshot($fileName, $this->screenshotDir.'/'.$featureFolder.'/');
    }
798284
protected function renderTemplateToFile(string $templateName, array $variables, string $fileName)
    {
        /** @var StandaloneView $renderer */
        $renderer = GeneralUtility::makeInstance(StandaloneView::class);
        $renderer->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateName));
        $renderer->assignMultiple($variables);
        $content = \trim((string)$renderer->render());
        // Note: Create even empty htaccess files (do not check!!!), so the delete is in sync
        GeneralUtility::writeFile($fileName, $content);
    }
298385
public function handleFileSize(string $fileName): void
	{
		if ($this->presenter->isAjax()) {
			$this->template->files = [$this->getFileInfo($fileName, true)];
			$this->redrawControl('itemsContainer');
		} else {
			exit;
		}
	}
1370545
public function afterSave()
    {
        if ($this->file instanceof UploadedFile !== true) {
            return;
        }

        $path = $this->getUploadedFilePath($this->attribute);

        FileHelper::createDirectory(pathinfo($path, PATHINFO_DIRNAME), 0775, true);

        if (!$this->file->saveAs($path)) {
            throw new FileUploadException($this->file->error, 'File saving error.');
        }

        $this->owner->trigger(static::EVENT_AFTER_FILE_SAVE);
    }
1136609
public function renderFile(File &$file)
    {
        if ($file->isRendered()) {
            return;
        }
        $fileRenderer = $this->get($file->getExt());
        $file->setContent($fileRenderer->render($file));
        $file->setExt($fileRenderer->getDestinationExtension($file->getExt()));
        $file->setRendered(true);
        $fileRenderer->mutateFile($file);
    }
189806
public function load($filename)
    {
        if ($filename && file_exists($filename)) {
            $this->doc->load($filename, LIBXML_NSCLEAN);
        } else {
            $this->createBasicDocument();
        }
    }
763978
function(filename, done) {
    this.debug('Capturing page at ' + filename);
    getPage(function(page) {
      page.render(filename, done);
    });
  }
656101
public function setFilename($filename)
    {
        if (is_array($filename) && isset($filename['name'])) {
            $this->filename = $filename['name'];
        } else {
            $this->filename = $filename;
        }
    }
893967
protected function afterDelete() 
	{
		parent::afterDelete();
		//delete article image
		$banner_path = "public/banner";
		
		if($this->banner_filename != '' && file_exists($banner_path.'/'.$this->banner_filename))
			rename($banner_path.'/'.$this->banner_filename, 'public/banner/verwijderen/'.$this->banner_id.'_'.$this->banner_filename);
	}
1182733
protected static function after(Element $element, string $phpExpression): void
    {
        $element->insertAfterSelf(
            static::toPhp($phpExpression)
        );
    }
325379
public function run_afters($scope) {    
    foreach ($this->_afters as $after) {
      $after($scope);
    }

    if ($this->_parent) {
      $this->_parent->run_afters($scope);
    }
  }
618460
public function afterStore(Event $event) {
		$this->pathBuilder($event->getSubject()->pathBuilder());
		$this->subject = $event->getSubject();

		$this->autoProcessImageVersions($event->getData('entity'), 'create');
	}
912662
private function printStepOnAfterEvent(Formatter $formatter, Event $event)
    {
        if (!$event instanceof AfterStepTested) {
            return;
        }

        $this->stepPrinter->printStep($formatter, $this->scenario, $event->getStep(), $event->getTestResult());

        if ($this->setupPrinter) {
            $this->setupPrinter->printTeardown($formatter, $event->getTeardown());
        }
    }
751991
private function after(callable $after): void
    {
        if ($after instanceof Closure) {
            $this->options["after"] = $after->bindTo($this);
        } else {
            $this->options["after"] = $after;
        }
    }