SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 439 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

The example below creates the component
controller, sets the controller's ACO section, and executes the task:
$task = JRequest->getVar('task', 'view', 'GET', 'WORD');
$controller = new myExtensionController();
$controller->setAccessControl('com_myExtension');
$controller->execute($task);
When we run execute(), if the controller knows which ACO section to look at, it
will check the permissions of the current user's group. The example above checks for
permissions to ACO com_myExtension > $task.
We don't have to use the task as the section value; instead we can use the optional
second parameter in the setAccessControl() method. This example checks for
permissions to the ACO com_myExtension > manage irrespective of the task:
$task = JRequest->getVar('task', 'view', 'GET', 'WORD');
$controller = new myExtensionController();
$controller->setAccessControl('com_myExtension', 'manage');
$controller->execute($task);
Chapter 11
[ 327 ]
When dealing with more complex permissions we can use AXOs to extend ACOs.


Pages:
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6