sharepoint online – column not visible in the new library settings and library views

I created a site column with a field definition that contains hidden equal to true and added this site column to the document content type. Now I have created some content types that inherit the document content type and the content types used by libraries. Now I have a situation where I have to display that particular site column in library views.

To do this, I get the field of the document content type and set it to false and update the field.

This way I can add the column in the library views, but the problem is that when I create a new library, this column is not visible to add to a view.

Field field = clientContext.Web.GetContentTypeByName(contentType).Fields.GetFieldByInternalName(siteColumn);
field.Hidden = false;
field.UpdateAndPushChanges(true);
clientContext.ExecuteQueryRetry(ConfigHelper.ThrottleRetryCount, ConfigHelper.ThrottleDelay);

and tried this too

Field field = clientContext.Site.RootWeb.Fields.GetFieldByInternalName(siteColumn);
field.Hidden = false;
field.UpdateAndPushChanges(true);
clientContext.ExecuteQueryRetry(ConfigHelper.ThrottleRetryCount, ConfigHelper.ThrottleDelay);

Views – Count how many nodes were updated per user

I use Drupal 8.

I tried to find out how many nodes (number) were created by every user of my Drupal site.

After some excellent (albeit fairly old) topics here and here among other sources, I managed to create one view that answers this question. I added a criterion to filter the date. I uncover the filter so I can play around with it. The results are a table like:

User     Nodes Created
 A           20
 B           10
 C           5

But I also want something more subtle that I couldn't find help for.

I want to know how many node updates a user has done. Something like a table:

    User     Updates
     A        100
     B        90
     C        80

etc..

I have no idea if this is possible and could not find any relevant information. I have not used revisions on my website if this is relevant.

Hope it makes sense

Thanks in advance for any help.

Views – How do I grant access rights for custom text box plugins?

I want to give the custom text field handler access permissions in views to display the field based on the user permissions.

This is my custom view field handler referenced: https://www.webomelette.com/creating-custom-views-field-drupal-8

This is my custom link = & # 39; / group / {{raw_arguments.gid}} / admin / title / {{nid}} / assets & # 39; which uses the argument value from the Replacements pattern.

 public function render(ResultRow $values) {
    $path = $this->options('alter')('path');
    $url = Url::fromUserInput($path);    
    //kint(get_defined_vars());exit;
   //return ViewsRenderPipelineMarkup::create(Xss::filterAdmin($this->options('link_title')));
    $url = Url::fromUserInput($path);
    if($url->access(Drupal::currentUser())) {
      return ViewsRenderPipelineMarkup::create(Xss::filterAdmin($this->options('link_title')));
    //return Link::fromTextAndUrl($this->options('link_title'), Url::fromUserInput($path, $options))->toString();

    }
  }.

Output is shown in the code above, but access permission cannot be verified due to a custom argument that could not determine the actual URL path

Hooks – How to give access permissions for custom text box plugins in Drupal 8 views

I want to give the custom text field handler access permissions in views to display the field based on the user permissions.

This is my custom view field handler referenced: https://www.webomelette.com/creating-custom-views-field-drupal-8

This is my custom link = & # 39; / group / {{raw_arguments.gid}} / admin / title / {{nid}} / assets & # 39; which uses the argument value from the Replacements pattern.

 public function render(ResultRow $values) {
    $path = $this->options('alter')('path');
    $url = Url::fromUserInput($path);    
    //kint(get_defined_vars());exit;
   //return ViewsRenderPipelineMarkup::create(Xss::filterAdmin($this->options('link_title')));
    $url = Url::fromUserInput($path);
    if($url->access(Drupal::currentUser())) {
      return ViewsRenderPipelineMarkup::create(Xss::filterAdmin($this->options('link_title')));
    //return Link::fromTextAndUrl($this->options('link_title'), Url::fromUserInput($path, $options))->toString();

    }
  }.

Output is shown in the code above, but access permission cannot be verified due to a custom argument that could not determine the actual URL path

7 – How can we display active filter values ​​in exposed views?

I need to display selected filter values ​​from views that show filters.

For example: If I choose OptionA from Filter-1(Select list) and OptionB from Filter-2(Select list), the results are sure to be filtered out, but together with that I want to display something like:

Active Filters: OptionA, OptionB, Reset

I tried using the display form as a block and another option available in views, but did not meet expectations. Can someone help me here?

Views – How to create a listing page with content without using the user interface

I am currently trying to create a Drupal 8 site that displays a list of actors with their picture, description and rating. I've already done this myself with the Drupal user interface, but I want to do the same programmatically. I created the content types and added some content. Now I have to list this content on a list page. If anyone can help me create a custom module and how I can do this task entirely with coding.

Views – Change the value of the exposed filter programmatically based on another exposed filter

I have 2 exposed filters in my Drupal 8 view – both are selected dropdowns. I want the value of the 2nd filter to change based on the selection of the first filter
Here are the filters
$filters = $view->display_handler->getOption('filters');

$filters('country') and $filters('states').

The problem is that I always get an empty value when I try to access the country filter in my views_pre_view hook.

dpm($filters('country')('value')) always prints blank.

How do I solve this please?

Views – programmatically create a custom block in Drupal 8

I have not found a way to display the view and restrict it for certain roles.

But I managed to solve the problem in a different way.

I have created a script in Admin> Structure> Block> My_Block> Configure> Visibility PHP::

getAccount()->getRoles(TRUE);
$hide_from_roles = array('administrator', 'sefii', 'membership');
 if (count(array_intersect($heh, $hide_from_roles)) > 0) {
    $match = FALSE;
}
return $match;
?>