Search code examples
phpapidrupal-7bitnami

Where can I find the function definition and documentation that explain this call in Drupal APIs?


In a Drupal project, the following calls are being made. in different APIs

<?php
     function GetAllCities($decrypted_json)
     {
         echo file_get_contents(public_url."city-view");
     }
?>

Moreover I see the following in different scripts:

echo file_get_contents(public_url."stylist-services?stylistnid=".$decrypted_json->stylistnid);
echo file_get_contents(public_url."sub-category-view");

Now I am unable to get to the definition of the following calls in the above code:

  1. city-view
  2. stylist-services
  3. stylistnid
  4. sub-category-view

When I echo the public_url, I get the following response

http://x.x.x.x/drupal/

I am just looking for a way to understand what these calls are and what these do. There is no documentation, no comments, no hint. Let me know if I can provide any more information.


Solution

  • We don't know exactly what those functions do just from the names - maybe you get different data if you pass some parameters to it (e.g. to restrict the list). Who knows, without seeing the method or any docs.

    You should read the Drupal docs to see how views are defined in that framework. There will be a structured way to do it, so then you might be able to logically work out which bit of code is providing that function, and then read it to understand what it can and cannot do. If you're really lucky the code may be commented in a useful way explaining the functionality!