Get custom field value on entries.onBeforeSaveEntry event I am trying to get a custom field value on entries.onBeforeSaveEntry, event.  So I can perform some action depending on the value of that field.  

craft()-&gt;on('entries.onBeforeSaveEntry', function(Event $event)
{
    $entry = $event-&gt;params['entry'];
    $entry-&gt;publishOnMobileApp;  //publishOnMobileApp is the field handle
});


Now this line.

$entry-&gt;publishOnMobileApp;


Returns 

Craft\MultiOptionsFieldData Object ( 
    [_options:Craft\MultiOptionsFieldData:private] =&gt; 
Array ( [0] =&gt; Craft\OptionData Object 
( 
    [label] =&gt; Yes [value] =&gt; yes [selected] =&gt; )
)
   [storage:ArrayObject:private] =&amp;gt; Array()
)


I am not sure how exactly I can access just the value of the field (which is "yes" in this case) so I can perform a check.
Please take a look at the docs it's the same in PHP as in Twig

foreach($entry-&gt;getFieldValue('publishOnMobileApp')-&gt;options as $option){
    if($option-&gt;selected){
         // $option-&gt;label is selected
    }
}