Skip to content

Commit

Permalink
last batch of link corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Simply007 committed Sep 19, 2022
1 parent cd5a955 commit fc7373c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion wiki/Configuring-PHP-Storm-on-Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Simply click "Initialize" and let the IDE use the suggested values:

The final step is to create a test configuration. In the Project Tree, right click the tests folder and choose "Run 'tests'" from the menu. An edit dialog will appear:

![Edit Configuration Dialog](https://github.com/Kentico/kontent-kenico-delivery-sdk-php/blob/master/wiki/img/03EditConfigurationDialog.png)
![Edit Configuration Dialog](./img/03EditConfigurationDialog.png?raw=true)

Choose fix and setup "PHP language level" and "CLI Interpreter" this way:

Expand Down
2 changes: 1 addition & 1 deletion wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extension=openssl

You're ready to start coding in PHP!

[**Part 2: Continue reading about debugging, unit testing, autoloading, bootstrapping...**](https://github.com/Kentico/kontent-delivery-sdk-php/wiki/Doing-PHP-stuff-on-Windows-with-VS-Code)
[**Part 2: Continue reading about debugging, unit testing, autoloading, bootstrapping...**](https://github.com/kontent-ai/delivery-sdk-php/blob/master/wiki/Doing-PHP-stuff-on-Windows-with-VS-Code.md)

## More resources

Expand Down
10 changes: 5 additions & 5 deletions wiki/Doing-PHP-stuff-on-Windows-with-VS-Code.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
## Package Management

- The main package management tooling for PHP is called Composer - [https://getcomposer.org](https://getcomposer.org)
- It's necessary to have it [installed](https://github.com/Kentico/kentico-delivery-sdk-php/wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies) to successfully install/update/restore packages
- It's necessary to have it [installed](https://github.com/kontent-ai/delivery-sdk-php/blob/master/wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies.md) to successfully install/update/restore packages
- The main package source for PHP is called Packagist - [https://packagist.org/](https://packagist.org/)
- When you want to install project's packages (dependencies), simply run `composer install`

## Autoloading

Autoloading is a mechanism that saves you from calling `require` and `include` all the time to load all the necessary types. While there are bazillion ways to implement autoloading, there are some standard approaches, namely PSR-0 and [PSR-4](http://www.php-fig.org/psr/psr-4/). Luckily, the standard package management ecosystem - Composer implements both of them.
All you need to do is to specify what needs to be loaded in the [composer.json](https://github.com/Kentico/kontent-delivery-sdk-php/blob/master/composer.json) file. For instance:
All you need to do is to specify what needs to be loaded in the [composer.json](https://github.com/kontent-ai/delivery-sdk-php/blob/master/composer.json) file. For instance:

```json
"autoload": {
"psr-4": {
"Kentico\\Kontent\\": "src/Kentico/Kontent"
"Kontent\\Ai": "src/Kontent/Ai"
}
}
```
Expand All @@ -36,7 +36,7 @@ For a test to be discovered:

- The .php file needs to end with `Test` (case-sensitive). For instance: `ClientTest.php`
- The test methods need to start with `test` (case-sensitive). For instance `public function testMyCode()`
- PHPUnit needs to be instructed where to look for the tests. There are more ways of doing this, one of them is to provide the [`phpunit.xml` file](https://github.com/Kentico/kontent-delivery-sdk-php/blob/master/phpunit.xml)
- PHPUnit needs to be instructed where to look for the tests. There are more ways of doing this, one of them is to provide the [`phpunit.xml` file](https://github.com/kontent-ai/delivery-sdk-php/blob/master/phpunit.xml)

```xml
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -60,7 +60,7 @@ For a test to be discovered:
</phpunit>
```

- notice the `bootstrap` attribute. It's an "autoloader" for unit tests. For the most part, it'll just call the standard [autoloader](https://github.com/Kentico/kontent-delivery-sdk-php/blob/master/tests/bootstrap.php) but you can specify some extra loading logic.
- notice the `bootstrap` attribute. It's an "autoloader" for unit tests. For the most part, it'll just call the standard [autoloader](https://github.com/kontent-ai/delivery-sdk-php/blob/master/tests/bootstrap.php) but you can specify some extra loading logic.

- to run unit tests simply run `phpunit`

Expand Down
4 changes: 2 additions & 2 deletions wiki/How-to-publish-new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
private $sdkVersion = '6.0.0';
```

1. Go to [SDK GitHub page](https://github.com/Kentico/kontent-delivery-sdk-php)
1. Go to [SDK GitHub page](https://github.com/kontent-ai/delivery-sdk-php)
1. Select Releases
1. Click draft a new release
1. Define a tag value to the one that is defined in $sdkVersion field in [Delivery client](../src/Kontent/Ai/Delivery/DeliveryClient.php).
Expand All @@ -17,6 +17,6 @@

## How does it work

- Administrator account [kentico-bot](https://github.com/kontent-ai-bot) is connected to "kontent-ai" account on [Packagist](https://packagist.org).
- Administrator account [kontent-ai-bot](https://github.com/kontent-ai-bot) is connected to "kontent-ai" account on [Packagist](https://packagist.org).
- This allows Packagist to register the webhook for new tag creation using [Packagist application](https://github.com/settings/connections/applications/a059f127e1c09c04aa5a)
- For every created tag there is a new release made in [Packagist](https://packagist.org/packages/kontent-ai/delivery-sdk-php)
4 changes: 2 additions & 2 deletions wiki/Resolving-content-items-and-components-in-Rich-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This page describes how to resolve content items and components inside Rich text

## Items and components in Rich text

[Rich text elements](https://developer.kenticocloud.com/v1/reference#section-rich-text-element) in Kontent.ai can contain other content items and components. For example, if you write a blog post, you might want to insert a video or testimonial to a specific place in your article.
[Rich text elements](https://kontent.ai/learn/reference/kontent-apis-overview/#section-rich-text-element) in Kontent.ai can contain other content items and components. For example, if you write a blog post, you might want to insert a video or testimonial to a specific place in your article.

_Note_: Items and components are resolved using the same mechanism; your application does not need to differentiate them. You can learn more about the differences between items and components in our [API Reference](https://developer.kenticocloud.com/v1/reference#linked-content).
_Note_: Items and components are resolved using the same mechanism; your application does not need to differentiate them. You can learn more about the differences between items and components in our [API Reference](https://kontent.ai/learn/reference/kontent-apis-overview/#linked-content).

Without adjusting your application, any content item or component in a Rich text element will resolve to an empty object reference, which won't be rendered on the page.

Expand Down
8 changes: 3 additions & 5 deletions wiki/Resolving-links-to-content-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Content links

[Rich text elements](https://developer.kenticocloud.com/reference#content-type-element-object) in Kontent.ai can contain links to other content items. For example, if you run a blog, these content item links might represent hyperlinks to other blog posts or your contact page.
[Rich text elements](https://kontent.ai/learn/reference/kontent-apis-overview/#content-type-element-object) in Kontent.ai can contain links to other content items. For example, if you run a blog, these content item links might represent hyperlinks to other blog posts or your contact page.

Without adjusting your project, any link in a Rich text element that points to a content item will contain an empty value.

Expand All @@ -32,8 +32,8 @@ Without adjusting your project, any link in a Rich text element that points to a
To make sure such links resolve correctly on your website, you need to complete these steps:

1. Implement a content link URL resolver
1. Register the resolver within the `DeliveryClient` instance
1. Retrieve content of a Rich text element
2. Register the resolver within the `DeliveryClient` instance
3. Retrieve content of a Rich text element

## Implementing a resolver

Expand Down Expand Up @@ -114,5 +114,3 @@ The URL to the content item in the text is now correctly resolved.
included in the box.
</p>
```

![Analytics](https://kentico-ga-beacon.azurewebsites.net/api/UA-69014260-4/Kentico/kontent-delivery-sdk-php/wiki/Resolving-links-to-content-items?pixel)

0 comments on commit fc7373c

Please sign in to comment.