original_string: public function getDefaultAction()
      {
          // Determine the appliccable action
          if ( ! $this->default_action) {
              return null;
          }
  
          $actions = $this->default_action;
  
          if ( ! is_array($actions)) {
              $actions = [
                  new ModelActionReferenceData([
                      'strategy' => $actions,
                  ]),
              ];
          }
  
          $core = $this->getCore();
  
  
          foreach ($actions as $action) {
  
              $permissions = $action->permissions();
  
              if (    ! count($permissions)
                  ||  $core->auth()->user()->isAdmin()
                  ||  $core->auth()->user()->can($permissions)
              ) {
                  return $action;
              }
          }
  
          return null;
      }
code: public function getDefaultAction()
      {
          // Determine the appliccable action
          if ( ! $this->default_action) {
              return null;
          }
  
          $actions = $this->default_action;
  
          if ( ! is_array($actions)) {
              $actions = [
                  new ModelActionReferenceData([
                      'strategy' => $actions,
                  ]),
              ];
          }
  
          $core = $this->getCore();
  
  
          foreach ($actions as $action) {
  
              $permissions = $action->permissions();
  
              if (    ! count($permissions)
                  ||  $core->auth()->user()->isAdmin()
                  ||  $core->auth()->user()->can($permissions)
              ) {
                  return $action;
              }
          }
  
          return null;
      }
code_tokens: public function getDefaultAction ( ) { // Determine the appliccable action if ( ! $ this -> default_action ) { return null ; } $ actions = $ this -> default_action ; if ( ! is_array ( $ actions ) ) { $ actions = [ new ModelActionReferenceData ( [ 'strategy' => $ actions , ] ) , ] ; } $ core = $ this -> getCore ( ) ; foreach ( $ actions as $ action ) { $ permissions = $ action -> permissions ( ) ; if ( ! count ( $ permissions ) || $ core -> auth ( ) -> user ( ) -> isAdmin ( ) || $ core -> auth ( ) -> user ( ) -> can ( $ permissions ) ) { return $ action ; } } return null ; }
docstring: Returns the default action for list rows.
  
  @return ModelActionReferenceDataInterface|null
docstring_tokens: Returns the default action for list rows .