code: public function doHandlePrimary($role = null)
      {
          if (!$this->handlePrimary) {
              return false;
          }
  
          if (in_array($role, ['child', self::ROLE_CHILD])
              && $this->handlePrimary === self::ROLE_CHILD) {
              return true;
          }
  
          if (in_array($role, ['parent', self::ROLE_PARENT])
              && $this->handlePrimary === self::ROLE_PARENT) {
              return true;
          }
  
          return false;
      }
docs: [[@doctodo method_description:doHandlePrimary]].
  
  @param [[@doctodo param_type:role]] $role [[@doctodo param_description:role]] [optional]
  
  @return [[@doctodo return_type:doHandlePrimary]] [[@doctodo return_description:doHandlePrimary]]