public static function getRiverObject(ElggRiverItem $river) {

		if (!$river instanceof ElggRiverItem) {
			return false;
		}

		$object = $river->getObjectEntity();

		$views = self::getActionableViews();

		if (in_array($river->view, $views)) {

			// wrapping this in ignore access so that we do not accidentally create duplicate
			// river objects
			$ia = elgg_set_ignore_access(true);

			$guid = InteractionsCache::getInstance()->getGuidFromRiverId($river->id);

			if (!$guid) {
				$object = InteractionsService::createActionableRiverObject($river);
				$guid = $object->guid;
			}

			elgg_set_ignore_access($ia);

			$object = get_entity($guid);
		}

		if ($object instanceof ElggEntity) {
			$object->setVolatileData('river_item', $river);
		}

		return $object;
	}
public static function getRiverObject(ElggRiverItem $river) {

		if (!$river instanceof ElggRiverItem) {
			return false;
		}

		$object = $river->getObjectEntity();

		$views = self::getActionableViews();

		if (in_array($river->view, $views)) {

			// wrapping this in ignore access so that we do not accidentally create duplicate
			// river objects
			$ia = elgg_set_ignore_access(true);

			$guid = InteractionsCache::getInstance()->getGuidFromRiverId($river->id);

			if (!$guid) {
				$object = InteractionsService::createActionableRiverObject($river);
				$guid = $object->guid;
			}

			elgg_set_ignore_access($ia);

			$object = get_entity($guid);
		}

		if ($object instanceof ElggEntity) {
			$object->setVolatileData('river_item', $river);
		}

		return $object;
	}
public static function getRiverObject ( ElggRiverItem $ river ) { if ( ! $ river instanceof ElggRiverItem ) { return false ; } $ object = $ river -> getObjectEntity ( ) ; $ views = self :: getActionableViews ( ) ; if ( in_array ( $ river -> view , $ views ) ) { // wrapping this in ignore access so that we do not accidentally create duplicate // river objects $ ia = elgg_set_ignore_access ( true ) ; $ guid = InteractionsCache :: getInstance ( ) -> getGuidFromRiverId ( $ river -> id ) ; if ( ! $ guid ) { $ object = InteractionsService :: createActionableRiverObject ( $ river ) ; $ guid = $ object -> guid ; } elgg_set_ignore_access ( $ ia ) ; $ object = get_entity ( $ guid ) ; } if ( $ object instanceof ElggEntity ) { $ object -> setVolatileData ( 'river_item' , $ river ) ; } return $ object ; }
Get an actionable object associated with the river item
This could be a river object entity or a special entity that was created for this river item

@param ElggRiverItem $river River item
@return ElggObject|false
Get an actionable object associated with the river item This could be a river object entity or a special entity that was created for this river item