Révision 41cc1b08
Ajouté par Assos Assos il y a presque 9 ans
drupal7/sites/all/modules/feeds/includes/FeedsConfigurable.inc | ||
---|---|---|
44 | 44 |
protected $disabled; |
45 | 45 |
|
46 | 46 |
/** |
47 |
* Instantiate a FeedsConfigurable object. |
|
47 |
* Instantiates a FeedsConfigurable object.
|
|
48 | 48 |
* |
49 |
* Don't use directly, use feeds_importer() or feeds_plugin() |
|
50 |
* instead. |
|
49 |
* Don't use directly, use feeds_importer() or feeds_plugin() instead. |
|
50 |
* |
|
51 |
* @see feeds_importer() |
|
52 |
* @see feeds_plugin() |
|
51 | 53 |
*/ |
52 | 54 |
public static function instance($class, $id) { |
53 |
// This is useful at least as long as we're developing. |
|
54 |
if (empty($id)) { |
|
55 |
throw new Exception(t('Empty configuration identifier.')); |
|
55 |
if (!strlen($id)) { |
|
56 |
throw new InvalidArgumentException(t('Empty configuration identifier.')); |
|
56 | 57 |
} |
57 | 58 |
static $instances = array(); |
58 | 59 |
if (!isset($instances[$class][$id])) { |
... | ... | |
169 | 170 |
return array(); |
170 | 171 |
} |
171 | 172 |
|
173 |
/** |
|
174 |
* Returns whether or not the configurable has a config form. |
|
175 |
* |
|
176 |
* @return bool |
|
177 |
* True if the configurable has a config form, and false if not. |
|
178 |
*/ |
|
179 |
public function hasConfigForm() { |
|
180 |
$form_state = array(); |
|
181 |
return (bool) $this->configForm($form_state); |
|
182 |
} |
|
183 |
|
|
172 | 184 |
/** |
173 | 185 |
* Return configuration form for this object. The keys of the configuration |
174 | 186 |
* form must match the keys of the array returned by configDefaults(). |
... | ... | |
202 | 214 |
drupal_set_message(t('Your changes have been saved.')); |
203 | 215 |
feeds_cache_clear(FALSE); |
204 | 216 |
} |
217 |
|
|
218 |
/** |
|
219 |
* Returns an array of required modules. |
|
220 |
* |
|
221 |
* @return array |
|
222 |
* The modules that this configurable requires. |
|
223 |
*/ |
|
224 |
public function dependencies() { |
|
225 |
return array(); |
|
226 |
} |
|
205 | 227 |
} |
206 | 228 |
|
207 | 229 |
/** |
Formats disponibles : Unified diff
Update feeds 7.x-2.0-alpha9 -> 7.x-2.0-beta1
Install lib simplepie 1.3.1