You are here

public function CslStyle::setParent in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/CslStyle.php \Drupal\bibcite\Entity\CslStyle::setParent()

Set parent style.

Parameters

\Drupal\bibcite\Entity\CslStyleInterface|null $parent: Parent style object or NULL if you want to delete relationship.

Return value

$this

Overrides CslStyleInterface::setParent

1 call to CslStyle::setParent()
CslStyle::preSave in src/Entity/CslStyle.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/CslStyle.php, line 170

Class

CslStyle
Defines the CSL style entity.

Namespace

Drupal\bibcite\Entity

Code

public function setParent($parent = NULL) {
  $this->parent = $parent instanceof CslStyleInterface ? $this->parent = $parent
    ->id() : ($this->parent = $parent);
  return $this;
}