addField('ml', 'mlid'); $query->condition('link_path', $node_path); $result = $query->execute()->fetchAssoc(); if ($result == FALSE) { return NULL; } return $result['mlid']; } /** * Return the Universally Unique ID of a node with a given Node ID. * * @param $nid * The NID of a node. * * @return * The UUID of the node with the given NID; xor (FALSE if the node doesn't * exist OR there the node has not been assigned a UUID yet). * * @see entity_get_uuid_by_id() */ function _node_export_book_nid_to_uuid($nid) { $uuid = entity_get_uuid_by_id('node', array($nid), FALSE); return array_pop($uuid); } /** * Return the Node ID of a node with a given Universally-Unique ID. * * @param $uuid * The UUID of a node. * * @return * The NID of the node with the given UUID; xor NULL if there are no nodes * with that UUID. * * @see entity_get_id_by_uuid() */ function _node_export_book_uuid_to_nid($uuid) { $nid = entity_get_id_by_uuid('node', array($uuid), FALSE); return array_pop($nid); } /** * Return the Menu Link ID of a node with a given Universally-Unique ID. * * @param $uuid * The UUID of a node. * * @return * The MLID of the node with the given UUID; xor NULL if there are no nodes * with that UUID. * * @see _node_export_book_uuid_to_nid() * @see _node_export_book_nid_to_mlid() */ function _node_export_book_uuid_to_mlid($uuid) { return _node_export_book_nid_to_mlid(_node_export_book_uuid_to_nid($uuid)); }