Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor NoApps NoProducts and NoApis blocks #46

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions apic_api/src/Plugin/Block/NoApisBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

/********************************************************* {COPYRIGHT-TOP} ***
* Licensed Materials - Property of IBM
* 5725-L30, 5725-Z22
*
* (C) Copyright IBM Corporation 2018, 2022
*
* All Rights Reserved.
* US Government Users Restricted Rights - Use, duplication or disclosure
* restricted by GSA ADP Schedule Contract with IBM Corp.
********************************************************** {COPYRIGHT-END} **/

/**
* @file
* Contains \Drupal\apic_app\Plugin\Block\NoApisBlock.
*/

namespace Drupal\apic_app\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
* Provides a block to display when the apis view page display has no results.
*
* @Block(
* id = "noapisblock",
* admin_label = @Translation("No Apis Block"),
* category = @Translation("IBM API Developer Portal (Application)")
* )
*
*/
class NoApisBlock extends BlockBase implements ContainerFactoryPluginInterface {

/**
* {@inheritdoc}
*/
public function build(): array {

return [
'#theme' => 'no_apis_block'
];
}

}
234 changes: 234 additions & 0 deletions apic_api/templates/no-apis-block.html.twig

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions apic_app/src/Plugin/Block/NoAppsBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

/********************************************************* {COPYRIGHT-TOP} ***
* Licensed Materials - Property of IBM
* 5725-L30, 5725-Z22
*
* (C) Copyright IBM Corporation 2018, 2022
*
* All Rights Reserved.
* US Government Users Restricted Rights - Use, duplication or disclosure
* restricted by GSA ADP Schedule Contract with IBM Corp.
********************************************************** {COPYRIGHT-END} **/

/**
* @file
* Contains \Drupal\apic_app\Plugin\Block\NoAppsBlock.
*/

namespace Drupal\apic_app\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
* Provides a block to display when the applications view page display has no results.
*
* @Block(
* id = "noappsblock",
* admin_label = @Translation("No Apps Block"),
* category = @Translation("IBM API Developer Portal (Application)")
* )
*
*/
class NoAppsBlock extends BlockBase implements ContainerFactoryPluginInterface {

/**
* {@inheritdoc}
*/
public function build(): array {

return [
'#theme' => 'no_apps_block'
];
}

}
214 changes: 214 additions & 0 deletions apic_app/templates/no-apps-block.html.twig

Large diffs are not rendered by default.

330 changes: 0 additions & 330 deletions ibm_apim/ibm_apim.emptycontent.inc

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions product/src/Plugin/Block/NoProductsBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

/********************************************************* {COPYRIGHT-TOP} ***
* Licensed Materials - Property of IBM
* 5725-L30, 5725-Z22
*
* (C) Copyright IBM Corporation 2018, 2022
*
* All Rights Reserved.
* US Government Users Restricted Rights - Use, duplication or disclosure
* restricted by GSA ADP Schedule Contract with IBM Corp.
********************************************************** {COPYRIGHT-END} **/

/**
* @file
* Contains \Drupal\apic_app\Plugin\Block\NoProductsBlock.
*/

namespace Drupal\apic_app\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
* Provides a block to display when the products view page display has no results.
*
* @Block(
* id = "noproductsblock",
* admin_label = @Translation("No Products Block"),
* category = @Translation("IBM API Developer Portal (Application)")
* )
*
*/
class NoProductsBlock extends BlockBase implements ContainerFactoryPluginInterface {

/**
* {@inheritdoc}
*/
public function build(): array {

return [
'#theme' => 'no_products_block'
];
}

}
Loading