Created
June 25, 2019 04:46
-
-
Save hatimalam/6d1930daf8d59443150eb6e31d2791e6 to your computer and use it in GitHub Desktop.
Custom Product Catalog Bean File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Overriding PC bean to enable ACL | |
* custom/modules/ProductTemplates/ProductTemplate.php | |
*/ | |
require_once("modules/ProductTemplates/ProductTemplate.php"); | |
class CustomProductTemplate extends ProductTemplate | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
// enable row level security | |
$this->disable_row_level_security = false; | |
} | |
//implement ACL access for ProductTemplate module | |
public function bean_implements($interface) | |
{ | |
switch ($interface) { | |
case 'ACL': | |
return true; | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment