code: public function attachDecorator($decorator)
      {
          if ($this->hasDecorator()) {
              $this->detachBehavior('__decorator');
          }
  
          return $this->_decorator = $this->attachBehavior('__decorator', ['class' => $decorator]);
      }
docs: [[@doctodo method_description:attachDecorator]].
  
  @param [[@doctodo param_type:decorator]] $decorator [[@doctodo param_description:decorator]]
  
  @return [[@doctodo return_type:attachDecorator]] [[@doctodo return_description:attachDecorator]]