/** * Constructor to generically set up the user id condition if * there is a current user. * * @param $connection */ function __construct($connection) { parent::__construct($connection); if (user_is_logged_in()) { global $user; $this->useridCondition($user->name); } }
/** * Allows defaults to be set on all RemoteEntityQueries for an entity type. * * @param RemoteEntityQuery $query * A RemoteEntityQuery, with the base already set by the entity controller. * This is passed by reference and should be altered directly. * The entity info for the base entity can be found in $query->entity_info. * * @see remote_entity_hook_entity_info() * @see RemoteEntityAPIDefaultController::getRemoteEntityQuery() */ function callback_remote_entity_query_defaults($query) { // We only work with remote entities of property foo equal to bar. $query->fieldRemoteCondition('foo', 'bar'); }