Answers.Body: <p>It's not a &quot;view&quot; in the drupal meaning of the word. It's coming from here: <a href="https://github.com/civicrm/civicrm-core/blob/6960dd4c1e5e99f8e0b3564dcc15269184d7702d/CRM/Core/Block.php#L523" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/6960dd4c1e5e99f8e0b3564dcc15269184d7702d/CRM/Core/Block.php#L523</a></p>
  <p>I think the &quot;right&quot; way to customize this would be with your own drupal module that creates a block that does the same thing but calls that <code>CRM_Event_BAO_Event::getCompleteInfo(date(&quot;Ymd&quot;));</code> function with the 2nd parameter which allows you to specify type.</p>
  <p>I don't know if there's a hook that would allow you to more easily customize it in a supported way. If you want to hack it, just add a second parameter on that line to specify the type.</p>
  <p>UPDATE: You could also do this as a drupal &quot;view&quot; if you install civicrm_entity. Views can be displayed as blocks.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T02:20:43.913Z
Answers.Text: You think thatif I edit my version of that blob and refresh my D8 cache then the my new pseudo block will show up as a block to add to a layout (like the current ones)?
  
    /**
     * The following blocks are supported.
     *
     * @var int
     */
    const
      CREATE_NEW = 1,
      RECENTLY_VIEWED = 2,
      DASHBOARD = 3,
      ADD = 4,
      LANGSWITCH = 5,
      EVENT = 6,
      FULLTEXT_SEARCH = 7;
Answers.UserDisplayName: HeneryH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T14:39:19.267Z
Answers.Text: Sort of. You'd need to either hack civi or make your own module. But I've updated answer since you could also do this with civicrm_entity.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T15:26:23.967Z
Answers.Text: I'll have to address this with the civi entity team but there is an install bug. composer 
      - drupal/civicrm_entity 3.0.0-beta1 requires drupal/civicrm * -> no matching package found.
Answers.UserDisplayName: HeneryH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T15:41:19.023Z
Answers.Text: Did you see the note at https://github.com/eileenmcnaughton/civicrm_entity/tree/8.x-3.x#installing-8x-30-beta2-or-later
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T16:44:04.293Z
Answers.Text: Drupal Module civicrm_entity worked well.  Thank you @Demerit.  I had to git clone the repo since composer require didn't work but otherwise it works fine.
Answers.UserDisplayName: HeneryH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T01:21:25.687Z
Answers.LastActivityDate: 2020-11-26T14:37:59.783Z
Answers.LastEditDate: 2020-11-26T14:37:59.783Z
Answers.UserDisplayName: Demerit
Body: <p>I've been spending a lot of time in the Civi galaxy learning the ropes.  Now I am moving back to the drupal galaxy.  I know they reside in the same universe and there are some blocks pre-built to expose Civi to Drupal.</p>
  <p>Users are one area with overlap.</p>
  <p>But Views...  I see some pre-built civi views for me to place in Drupal.  Where are they defined??</p>
  <p>There is a pre-built view for upcoming events and I would like to tweak that to only show upcoming events where event type ==x.</p>
  <p>Any help would be appreciated!
  Thanks</p>
  
Tags: <civievent><drupal>
Title: Drupal-8 / Civi 5.32 -- In D8 I see some civi blocks for me to use. Where are they defined?
ThreadText: # Drupal-8 / Civi 5.32 -- In D8 I see some civi blocks for me to use. Where are they defined?
  
  (Asked by: username_0 on 2020-11-26)
  
  I've been spending a lot of time in the Civi galaxy learning the ropes. Now I am moving back to the drupal galaxy. I know they reside in the same universe and there are some blocks pre-built to expose Civi to Drupal.
  
  Users are one area with overlap.
  
  But Views... I see some pre-built civi views for me to place in Drupal. Where are they defined??
  
  There is a pre-built view for upcoming events and I would like to tweak that to only show upcoming events where event type ==x.
  
  Any help would be appreciated!
  Thanks
  
  **Tags:** civievent, drupal
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-11-26. Score: 2 | Accepted answer
  
  It's not a "view" in the drupal meaning of the word. It's coming from here: <https://github.com/civicrm/civicrm-core/blob/6960dd4c1e5e99f8e0b3564dcc15269184d7702d/CRM/Core/Block.php#L523>
  
  I think the "right" way to customize this would be with your own drupal module that creates a block that does the same thing but calls that `CRM_Event_BAO_Event::getCompleteInfo(date("Ymd"));` function with the 2nd parameter which allows you to specify type.
  
  I don't know if there's a hook that would allow you to more easily customize it in a supported way. If you want to hack it, just add a second parameter on that line to specify the type.
  
  UPDATE: You could also do this as a drupal "view" if you install civicrm\_entity. Views can be displayed as blocks.
  
  > **Comments:**
  > **username_0**: You think thatif I edit my version of that blob and refresh my D8 cache then the my new pseudo block will show up as a block to add to a layout (like the current ones)?    /**    * The following blocks are supported.    *    * @var int    */   const     CREATE_NEW = 1,     RECENTLY_VIEWED = 2,     DASHBOARD = 3,     ADD = 4,     LANGSWITCH = 5,     EVENT = 6,     FULLTEXT_SEARCH = 7;  
  > **username_1**: Sort of. You'd need to either hack civi or make your own module. But I've updated answer since you could also do this with civicrm_entity.  
  > **username_0**: I'll have to address this with the civi entity team but there is an install bug. composer      - drupal/civicrm_entity 3.0.0-beta1 requires drupal/civicrm * -> no matching package found.  
  > **username_1**: Did you see the note at https://github.com/eileenmcnaughton/civicrm_entity/tree/8.x-3.x#installing-8x-30-beta2-or-later  
  > **username_0**: Drupal Module civicrm_entity worked well.  Thank you @username_1.  I had to git clone the repo since composer require didn't work but otherwise it works fine.  
  
  ---
  
  