title: drupal 8 BaseFieldDefinition entity_reference with condition
body: <p>I am not sure if this is the right way to implement this, so I hope you can help me.
  I am trying to reference a custom content entity in Drupal 8 with the condition that only the entities created by the current user should show.</p>
  
  <p>Basically 
  CUSTOM ENTITY 1  -> CUSTOM ENTITY 2 (created by the user)</p>
  
  <p>I found a way to do this with views, but I am wondering how to achieve this programmatically. </p>
  
  <p>Please note that I have already managed to get a list of ids and display it as a drop down, but this is not what i want.</p>
  
  <p>I would like to show the reference as autocomplete .</p>
  
  <p>This is what i got so far:</p>
  
  <pre><code>$fields['dishes'] = BaseFieldDefinition::create('entity_reference')
          -&gt;setLabel(t('Dishes'))
          -&gt;setDescription(t('Select the dishes to add  to this menu'))
          -&gt;setSetting('target_type', 'dish')
          -&gt;setSetting('handler', 'default')
          -&gt;setTranslatable(TRUE)
          -&gt;setCardinality(-1)
          -&gt;setDisplayOptions('view', [
              'label' =&gt; 'hidden',
              'type' =&gt; 'entity_reference_label',
              'weight' =&gt; -1,
          ])
          -&gt;setDisplayOptions('form', [
              'type' =&gt; 'entity_reference_autocomplete',
              'weight' =&gt; -1,
              'settings' =&gt; [
                  'match_operator' =&gt; 'CONTAINS',
                  'size' =&gt; '60',
                  'autocomplete_type' =&gt; 'tags',
                  'placeholder' =&gt; '',
              ],
          ])
          -&gt;setDisplayConfigurable('form', FALSE)
          -&gt;setDisplayConfigurable('view', TRUE);
  </code></pre>
  
  <p>Is there a way to add conditions to this ?
  Or customise the query Drupal does to get the referenced entity?</p>