public function signalReceived($signal) { $parent = $this->getParent(); if ($parent instanceof TreeViewNode) { $parent->expand(); } parent::signalReceived($signal); }
/** * For @secure annotated signal handler methods checks if URL parameters has not been changed * @param string $signal * @throws BadSignalException */ public function signalReceived($signal) { $methodName = $this->formatSignalMethod($signal); if (method_exists($this, $methodName)) { $method = $this->getReflection()->getMethod($methodName); // if (Annotations::has($method, 'secured')) { if ($method->hasAnnotation('secured')) { $protectedParams = array(); foreach ($method->getParameters() as $param) { $protectedParams[$param->name] = $this->getParam($param->name); } if ($this->getParam('__secu') !== $this->createSecureHash($protectedParams)) { throw new BadSignalException('Secured parameters are not valid.'); } } } parent::signalReceived($signal); }