This method is called statically in eZTemplateDesignResource::handleResource so it should be called statically everywhere.