Skip to content

eZINI cache folder override, content controllers and fixes

Compare
Choose a tag to compare
@am0s am0s released this 22 Feb 13:26
· 25 commits to master since this release
  • Added workaround for missing column contentobject_id when fetching nodes with isObject = false
  • Test toolkit - Improved error/exception handling
  • Removed deprecated/illegal function call in session handler
  • Removed unused variables and code in ezfiletransport.php
  • Added event node/trash which fires when trashing an object.
  • Support for overriding ezini cache folder
  • Support for limiting editing of attributes

Overriding eZINI cache folder

eZINI now supports moving the cache folder by setting the environment variable EZP_INI_CACHE_PATH, e.g. var/site/cache/ini.
This is the same env variable that eZSys supports for its iniCachePath static function.

Content controllers

Content controllers is a new feature for controlling which attributes can be edited by the current user.
Each content controller is called when fetching input for an attribute and may deny access to editing that attribute.

Add the following to content.ini:

[EditSettings]
ContentControllers[]
ContentControllers[]=CustomContentController

Then implement a PHP class that has the canEditAttribute method.

class CustomContentController
{
    public function canEditAttribute($attribute)
    {
        // ...
        // return true or false
    }
}