I'm looking for something to help me understand drupal core and its functions. I've gotten a hang of writing modules, and I've found plenty of resources, such as books and blog posts. But I'm still stumbling when I find I'm needing to manipulate basic core functions such as creating nodes or manipulating users.
Of course, there is the documentation of each function, but it doesn't tell you much beyond what that function does.
For instance, I wanted to create some nodes automatically in my module. I know about
node_save, but I didn't know what fields I had to set in order for my new node to be saved properly. The documentation says that
node_save saves a node to the database -- so it doesn't tell you anything more than what the function name already says. My node creation in my module is not working. Then I hear somewhere along the about about
node_save_prepare for creating new nodes -- maybe I need to do that? But its documentation says that it prepares a node for editing. So I look in my module dev resources, and they talk about the various hooks... which assume some basic understanding of core functionality. So after some more hacking and trial and error, I get my nodes created... with the title only. Do I set the body with
$node->body = "blah" or
$node->body['und']['value'] = "blah" (and what is all that stuff, anyway)?
Of course I can source dive, but that doesn't really tell you any more about the right way to do things. So I'm looking for something comprehensive about "how do to things". Does there presently exist such a resource?
One book I have read is Pro Drupal 7 Development, and while it's a great resource for understanding hooks, it doesn't go into core functions in a comprehensive, foundational way.
Please note: It's okay to answer "No such single comprehensive resource exists" or "You'll have to piece it together from multiple sources." If that's the reality of the situation, I want to know that rather than continuing my holy grail quest. I'm not looking to be pointed to more piecemeal resources. I'm asking if there's one comprehensive one for understanding core api functions.