Closed (fixed)
Project:
Webform
Version:
7.x-4.0-alpha9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
25 Jun 2013 at 14:21 UTC
Updated:
25 Apr 2017 at 09:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedhere's the patch
Comment #2
quicksketchThanks, good call. Because Webform now requires PHP 5 (and has for quite a while), we should go ahead and replace that "var" declaration with another "public".
public has existed in every version of PHP 5: http://www.php.net/manual/en/language.oop5.properties.php
Comment #3
quicksketchThe particular approach taken isn't quite right, you shouldn't need to set
$exporter->options = $options;right after the constructor just received $options. If you wrote your own exporter, then that means you could simply set $this->options directly in your own class.Admittedly our OOP in the Webform exporters is super-old and maybe not as clear as it could be. I've committed this patch which converts to PHP5-style OOP and sets $options as a public variable. In the mean time if you're using Webform 3.x, I suggest just making your own constructor in your class and saving the $options variable manually. Then when you upgrade to Webform 4.x, this step will be done for you.
Comment #4
quicksketchCommitted to 7.x-4.x.
Comment #5
quicksketchI made an upgrade entry for this issue: https://drupal.org/node/1609324#webform-exporters