|
@@ 369-376 (lines=8) @@
|
| 366 |
|
* @return object |
| 367 |
|
* The created node. |
| 368 |
|
*/ |
| 369 |
|
public function nodeCreate($node) { |
| 370 |
|
$this->dispatchHooks('BeforeNodeCreateScope', $node); |
| 371 |
|
$this->parseEntityFields('node', $node); |
| 372 |
|
$saved = $this->getDriver()->createNode($node); |
| 373 |
|
$this->dispatchHooks('AfterNodeCreateScope', $saved); |
| 374 |
|
$this->nodes[] = $saved; |
| 375 |
|
return $saved; |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
/** |
| 379 |
|
* Parses the field values and turns them into the format expected by Drupal. |
|
@@ 506-513 (lines=8) @@
|
| 503 |
|
* @return object |
| 504 |
|
* The created term. |
| 505 |
|
*/ |
| 506 |
|
public function termCreate($term) { |
| 507 |
|
$this->dispatchHooks('BeforeTermCreateScope', $term); |
| 508 |
|
$this->parseEntityFields('taxonomy_term', $term); |
| 509 |
|
$saved = $this->getDriver()->createTerm($term); |
| 510 |
|
$this->dispatchHooks('AfterTermCreateScope', $saved); |
| 511 |
|
$this->terms[] = $saved; |
| 512 |
|
return $saved; |
| 513 |
|
} |
| 514 |
|
|
| 515 |
|
/** |
| 516 |
|
* Creates a language. |