Asked  7 Months ago    Answers:  5   Viewed   30 times

what is the difference between $_SERVER['REQUEST_URI'] and $_GET['q'] (which is used in Drupal)?

 Answers

25

Given this example url:

http://www.example.com/some-dir/yourpage.php?q=bogus&n=10

$_SERVER['REQUEST_URI'] will give you:

/some-dir/yourpage.php?q=bogus&n=10

Whereas $_GET['q'] will give you:

bogus

In other words, $_SERVER['REQUEST_URI'] will hold the full request path including the querystring. And $_GET['q'] will give you the value of parameter q in the querystring.

Wednesday, March 31, 2021
 
jedwards
answered 7 Months ago
28

OK. I got it working. I've updated the code above, its working for me. Just disabled and re-enabled the module and the same code started working. Its strange but it is, don't know what is the problem.

Wednesday, March 31, 2021
 
Andres
answered 7 Months ago
63

Nope, it's just documentation files that describe hooks by modules. About hook_entity_view: you can add it in custom module: YOURMODULENAME_entity_view(...).

Wednesday, March 31, 2021
 
subroutines
answered 7 Months ago
88
  • colorPrimary – The color of the app bar.
  • colorPrimaryDark – The color of the status bar and contextual app bars; this is normally a dark version of colorPrimary.
  • colorAccent – The color of UI controls such as check boxes, radio buttons, and edit text boxes.
  • windowBackground – The color of the screen background.
  • textColorPrimary – The color of UI text in the app bar.
  • statusBarColor – The color of the status bar.
  • navigationBarColor – The color of the navigation bar.

you can use following link to setup your style.

https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/

Sunday, August 8, 2021
 
turson
answered 3 Months ago
32

There are two key differences:

First, attributes assigned to a view via style will apply only to that view, while attributes assigned to it via android:theme will apply to that view as well as all of its children. For example, consider this style resource:

<style name="my_background">
    <item name="android:background">@drawable/gradient</item>
</style>

If we apply it to a LinearLayout with three child TextViews by using style="@style/my_background", then the linearlayout will draw with a gradient background, but the backgrounds of the textviews will be unchanged.

If instead we apply it to the LinearLayout using android:theme="@style/my_background" then the linearlayout and each of the three textviews will all use the gradient for their background.

The second key difference is that some attributes only affect views if they are defined in that view's theme. For example, consider this style resource:

<style name="checkboxes">
    <item name="colorAccent">#caf</item>
    <item name="colorControlNormal">#caf</item>
</style>

If I apply this to a CheckBox using style="@style/checkboxes", nothing will happen. If instead I apply it using android:theme="@style/checkboxes", the color of the checkbox will change.

Just like the first rule said, styles containing theme attributes will apply to all children of the view with the android:theme attribute. So I can change the color of all checkboxes in a linearlayout by applying android:theme="@style/checkboxes" to my linearlayout.

Sunday, August 22, 2021
 
McAuley
answered 2 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :