public function OnlyOne::setFormatter in Allow a content type only once (Only One) 8
Set the formatter for printing.
Parameters
\Drupal\onlyone\OnlyOnePrintStrategyInterface $formatter: The formatter type.
Return value
\Drupal\onlyone\OnlyOneInterface An object implementing the OnlyOneInterface interface.
Overrides OnlyOneInterface::setFormatter
File
- src/
OnlyOne.php, line 394
Class
- OnlyOne
- Class OnlyOne.
Namespace
Drupal\onlyoneCode
public function setFormatter(OnlyOnePrintStrategyInterface $formatter) {
$this->formatter = $formatter;
return $this;
}