[FLOW3-general] Aspect not working - not a cache problem

Mathias Bolt Lesniak, LiliO Design mathias at lilio.com
Thu Dec 22 13:46:39 CET 2011


Hi!

I'm trying out aspects, and my first attempt is to create an aspect for sending e-mails. My problem: I can't get the aspect to work.  I have tried flushing cache and running "rm -rf Data/Temporary/" to no avail. The file is recognized, as it appears in Data/Temporary. (Oh, yes: My UserController class does have an indexAction() method too.) 

I'm using FLOW3 1.0.2 (but had the same problem in 1.0.0)
PHP 5.3.8 Zend Engine v2.3.0 Xdebug v2.1.1
Mac OS X 10.7.2

Here's the aspect class file in its entirety:

****
<?php
namespace Foo\Bar\Aspect;

use Doctrine\ORM\Mapping as ORM;
use TYPO3\FLOW3\Annotations as FLOW3;


/*
 * E-mail aspect
 * 
 * @FLOW3\Scope("singleton")
 * @FLOW3\Aspect
 */
class EmailAspect {
	
	/**
	 * Send a welcome e-mail to a new user if setting emailNewUser is true
	 * 
	 * @param \TYPO3\FLOW3\AOP\JoinPointInterface $joinPoint
	 * @FLOW3\Before("method(Foo\Bar\Controller\UserController->indexAction())")
	 * @return void
	 */
	public function emailNewUser(\TYPO3\FLOW3\AOP\JoinPointInterface $joinPoint) {
		
		die('email user');
	}
	
}
?>
****


I wish you all a happy christmas!

Mathias Bolt Lesniak
LiliO - www.lilio.no
mathias at lilio.com


More information about the FLOW3-general mailing list